Add timeout when writing TCP data
When the TCP write buffers gets full, the uv_write()
could wait indefinitely until the other side reads the data from the stream. This MR adds a write timeout, so we end the stream if no activity is detected for some time.
Closes #3132 (closed)
Edited by Ondřej Surý