Refactor connection logic from simple_httpclient to a new tcpclient module.

This is preparation for introducing connection pooling and better
handling of ipv6.

If an IOStream was closed due to an exception, its Futures will
now raise that exception instead of StreamClosedError.
Hack around mac ipv6 firewall problems in bind_sockets to reenable tests.

Fix a test ResourceWarning.
Implement the "happy eyeballs" algorithm for ipv4/ipv6 selection.

IOStream.connect's Future resolves to the stream itself,
which streamlines some connection scenarios.
Allow ipv6 in simple_httpclient by default.

Improve connection error handling (especially for SelectIOLoop).