send_error() shouldn't expect that sock will be always non-NULL

We are calling send_error when connect is failing and obviously the
sockptr will be NULL in this case

Change-Id: I285fe446456cacb9548f9c06006146d2f61bff6b
Reviewed-on: http://review.couchbase.org/28946
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>