Deadlock with SelectorManager.doProcess and TcpConnection.write; patch by Sammy Yu and junrao; reviewed by Chris Goffinet for CASSANDRA-392