Handle waiting for a descriptor to become readable OR writable
This commit refactors our multiplexers to be able to wait for a
descriptor to become readable OR writable at the same time.
I kept the two separate maps for an easier handling of the separate
TTD and to limit the amount of changes, but we might want to merge
them into a single map in the future.
The accounting is moved into the parent class instead of being dealt
with by the multiplexers themselves.
I noticed that the poll multiplexer allocates and fills a vector of
pollfd for every call to run(), which seems wasteful, but I did not
want to touch that in this commit.
I did not compile or test the kqueue, ports and /dev/poll multiplexers
yet, so don't merge this without testing them first.