Connection timeout changed to include sending of the protocol header.

So far the timeout applied only to *receiving* of the protocol header.
This patch handles the unlikely situation if protocol header cannot
be *sent* for extended period of time for some reason.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>