kernel - Refactor kqueue interlocks
* Make KN_PROCESSING a soft lock flag. When set nobody else can mess
with a particular knote (other than setting certain flags) even if
the originator blocks.
* Interlock major processing with KN_PROCESSING. Registration, event
scan, knote(), deletion, and filter ops.
* Block & restart when conflicts occur. For the knote() hot-path we only
block and restart if the 'hint' is non-zero, otherwise we just flag with
KN_REPROCESS to indicate that reprocessing is required.
* This should fix kqueue races related to blocking operations confusing
the list scan.
* Document the shit out of everything.
Reported-by: Francois Tigeot <ftigeot@wolfpond.org>