Don't deadlock on reading and writing to the same Connection
Currently if one thread is reading from a Connection and another writes to it, it'll end up in a deadlock (at least until the a message is received on the socket). We should try and ensure that doesn't happen.
It'll be very tricky though. We'll need some kind of channel that we can poll together with the underlying socket. The sender thread can then use the channel to wake-up the receive call and get the lock on the socket.