Feature: Async Client
This is preparatory work for making these codepaths usable in an async
context. The goal is to represent the same state machine (async or
sync) via the context structure and calling function pointers that make
use of the context's data to perform io, handle results, etc.
This splits the connect codepaths into smaller units (generally
separating at the IO boundaries). It changes the mechanism for
executing the connect sequence to mimic what the async version will do.
It also makes a state machine for the authentication flow, similar to
the connect flow -- breaking it apart at the IO points.
This doesn't change the plugin portion yet, but does make the rest of it