Fix nonblocking connect on Windows

Use the correct value for the call to ioctlsocket() to set the socket to
nonblocking mode and check for WSAWOULDBLOCK return value of connect().
cyassl skip setting SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER

It's already the default and no "SSL_set_mode" in CYASSL

Reported by Chris Conlon <chris@wolfssl.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
Fix IPv6 on non-Linux platforms
Remove duplicated code for setting the socket options