cleanup Client.close

allows setting `linger` on sockets at shutdown time.
close Client sockets if connection fails

avoids runaway FDs in cases of frequent client failure.
Merge pull request #4074 from minrk/close-on-fail

close Client sockets if connection fails

also cleanup Client.close a little bit, allowing setting linger on sockets at shutdown time,
which is helpful for preventing FD growth on connection failure.

Should be considered for backport to 1.1.