Add select() socket multiplexer
Added poll() multiplexer, fixed a bug with reallocarray

- Reallocarray must not memset the new pointer to null, this corrupts memory if we pass it a non-null pointer.
- Made (untested) fixes to kqueue as a result of the above bug
- Added poll() multiplexer for platforms which support poll()
- Removed some cruft from the other multiplexers