Introduce support for building on MinGW/Cygwin systems

This patch modifies the build to properly handle MinGW/Cygwin
hosts and adds support for Windows sockets in the source.  This was
achieved by using MHD_socket as the socket datatype where necessary,
which is guaranteed to resolve to SOCKET on windows and int on unix
systems, preserving old functionality while adding new.  Some internal
functions were modified to accomodate the change, namely those that
implictly converted sockets to ints (which would have caused problems on
x86_64 windows, as those are 8 byte unsigned) All test cases
pass with MSYS2/MinGW compiler.