doConnect: directly close client connection if no need to retry.
Reorganize code in proxy.go
Fix CONNECT retry.
Refine timeout estimate.