Since open/close don't always match up in the vfs layer, add a counter to dirent. Should the vnode get doomed it provides information of how much should be subtracted from si_usecount.
It is race-compatible with previous code with one exception: transient v_usecount changes (e.g., exporting tty from sysctl) will no longer interfere. Other problems remain, for example someone else opening the tty for reading will prevent devfs_close from cleaning up in the session. I consider this beyond the scope of the patch.
This allows for much welcome removal of VCHR special casing in vnode refcount management routines.