Finished kqueue implementation, modulo testing.