Winsock fixes

Three fixes related to winsock on Windows. 

First one is pure cleanup and fixes the types of the ffi functions to match the types used on msdn. The vocab was inconsistent in that it sometimes used SOCKET and sometimes void*. 

Second one fixes SOCKET_ERROR which always should be -1. The current definition confuses SOCKET_ERROR with INVALID_SOCKET which indeed can be defined as `-1 <alien>`.

Third one wraps ioctlsocket which is a function you need to use to set a socket non-blocking. I intend to use that function in a different patch to fix a small bug in Windows openssl handling I found (SSL_connect) blocks.