kernel - implement serialno for kqueue poll handling part 1/2
* The kqueue implementation for the poll system call was improperly
triggering on spurious events.
* Adjust the poll support code to implement a serial number scheme
similar to how the select code works. The poll array index is also
encoded.
* poll() handles unsupported POLLPRI and POLLRDBAND requests differently
from select(). poll() ignores these requests if they are not supported
(select returns an error).
Allow kqfilter functions to return EPERM or EOPNOTSUPP to indicate
an unsupported filter. Return values will be fixed in part 2.