MinGW compilation fixes
 - IPV6_V6ONLY is not defined in all MinGW versions, silently define if missing
 - CONNECT_NONBLOCK had UNIX-centric definition, added Win32 semantics to it
 - fixed code rot in socket.c, in Win32-only code