Readd paired_listeners.

Ensures that listeners shutdown safely - i.e. that their sockets aren't
prematurely closed by their paired_listener.

This didn't work earlier in the project since threads could just block
on I/O, although I've now added SELECT based timeouts to prevent that.