cuse_kern_uninit() can hang on destroy_dev(), because of threads
sleeping in CUSE_IOCTL_GET_COMMAND, so wake them up before calling
destroy_dev(). Also do not allow threads to go back to sleep if the
is_closing flag has been set.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation