when the code to handle TCP connect timeouts was moved out of
connect_timeout(), it caused hangs when dig connected via TCP to a
server and the connection succeded but the server never sent a
response. we should add a read timeout mechanism for client TCP
connections as well as a connect timeout mechanism. in the meantime,
however, I've restored the TCP functionality in connect_timeout()
so it can handle the case of read timeouts.