Adds KQueue support
Adds the basic structure needed for kqueue, but the actual
code needs to be tested before it can be used.  Sadly, I
cannot test it, because I do not have the correct
environment.  I will test it in the future, however.