Reconnect on EINVAL for windows

Sometimes on WinXP second call of WSAConnect function returns
WSAEINVAL. To avoid it we make reconnect

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