Manually merge Win32 changes from MIQ
There were some things that weren't applicable.
There were also some leftover conflicts on the PrintDlg renaming.

Include Winsock2.h before Windows.h

unistd.h on mingw-w64 includes winsock2.h.

Disable python_ui_fd_callback completely on Windows