Generic TCP connection pool for gevent-based applications