Close sockets when they are dropped
Implements most of the strategy in #4.

Closes #4.

We will also need to move IoError to a hint, since it's not supported by
all backends.
Actually register interest in RDHUP