Implement TCPConnection.keepAlive. Fixes #622.