Added support for asynchronous connect handling.

Change-Id: Id27a5550dd13a9350e5b4aa104c6dd6533b37d49
Reviewed-on: http://review.couchbase.org/34149
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>