Fix-ups for connect refactor

Summary:
1) Fix double-close

When refactoring the error path for connects, I added a
vio_delete to ensure net->vio was cleaned up.  This unfortunately
introduced a behavior that double close()'d descriptors in error
codepaths.

The fix is to ensure that net->vio's socket, if closed manually, is
properly marked as inactive in net->vio so that it doesn't try to call
shutdown and close.

This codepath is convoluted because it is trying to re-use the vio
structure but only close the underlying socket.  Cleaner would be to
simply call vio_delete but that change may have other ramifications and
would introduce more risk.

2) Don't perform a blocking wait for server greeting

When in nonblocking mode, we were still calling vio_io_wait
(with an infinite timeout) to receive the handshake greeting from the
MySQL server.  This means if the handshake is not sent, or delayed, then
the call actually blocks -- which causes delays for callers and
potential disaster if invoked from an IO loop of some kind.

Test Plan:
Used strace to verify the double close in the existing code,
and then verified the double close does not occur with client,
built with this diff.

mtr, also test reproduction case from external repo

Reviewers: steaphan

Reviewed By: steaphan