kqueue: avoid closing a file under the knlist lock
Killing a knote releases its file reference, and releasing the last one
runs the close path inline.
panic: _mtx_lock_sleep: recursed on non-recursive mutex ttymtx
Revoking a controlling tty during exit reaches this whenever a knote is
still registered on it.
Released the knlist lock around the drop and restart the walk.
The knote stays valid while the lock is released.
MFC: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D58681