Clearer handling of DNS lookup failures

This simply fixes up the code to:

- Print the return code of getaddrinfo() in the log messages
- Do not initiate the connect sequence on lookup failure (the way it was
  is entirely safe, it's just clearer if we don't call {E,C}_connect).

Change-Id: I3d7e0812a617db0d095255d35b129f1bdbf5256b
Reviewed-on: http://review.couchbase.org/44129
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>