kernel - kqueue - Bug fixing pass
* We cannot terminate the loop when events are received if all the
events are spurious (none were collected by the copyout).
* Move the WOULDBLOCK -> 0 handling out of kqueue_scan() and into
kern_kevent().
* Preset (*errorp) to 0 so it is set definitively for all cases, including
degenerate cases.
* Allow an infinite number of events when doselect() calls kern_kevent()
to avoid premature termination on successive calls which could occur
due to spurious events.
* Fix a bug in dopoll() where the bytes variable was calculated prior to
the truncation of nfds.
* Fix copyin/copyout arguments.
* Add missing rel_mplock() in pipe_kqfilter()