Changes for compiling under MinGW

Uses: GNU C compiler for MinGW-w64 targeting Win32

Tested with the packages gcc-mingw-w64-i686 and mingw-w64-i686-dev under
Debian Linux

MinGW has updated a lot and the generated makefile no longer works without
removing the -mno-cygwin flag. Also the features disabled in the Makefile
all seem to work now.
This patch adds ANSI.SYS, SCO Xenix 2.3.2 and a general ANSI emulation.

The SCO Xenix is a well defined but rather old style emulation similar
in many respects to the ANSI.SYS emulation but a bit nicer. The later
SCO Unix variants are far more uncertain as they cover may versions of
SCO Unix where the emulation was changed to maintain or provide minimal
compatibility with other systems.

In the SCO Xenix emulation I have assumed the mapchan(1) facility has
been used to set the default character set to the putty line codepage. So
if your application assumes the mapchan process hasn't been run you will
need to set the line charset to CP437. The ANSI.SYS emulation forces CP437.

echo -e '\e[41"p'     # Set normal PuTTY (xterm) mode.
echo -e '\e[41;1"p'   # Set modern Ansi mode, all available non VT sequences.
echo -e '\e[41;2"p'   # Set ANSI.SYS emulation
echo -e '\e[41;3"p'   # Set SCO Xenix

echo -e '\e[41;4"p'   # Set pure VT52 mode
echo -e '\e[41;5"p'   # Set pure VT220+ mode

These and all the compatibility stuff can be turned off using the compile
option DISABLE_COMPAT. Note, CSI 40;4"p turns off _nearly_ all the CSI
sequences, the exception being 'ESC[41"p'.
The SCO emulation overrides the configured function key definitions.

The SCO Xenix emulation does not have the reverse or graphic attribute
variables. However, I do have full details if these are needed.

In ANSI.SYS mode CSI-J homes cursor.

Some cleanups to the emulation switching.
DEBUG messages for tracing
Reconfigure PuTTY colour scheme from Unix host.

This is possibly related to: /wishlist/colour-scheme.html

These colour schemes are not stored in the PuTTY session file but are
instead "dynamically" configured from the host.

This script can send the required control sequences suitable for any
modern version of PuTTY or the Linux console.

It can calculate several standard forms and contains a default PuTTY
and XTerm mappings. In addition it can extract the colour scheme from
a Windows PuTTY registry dump, a Unix session file and a few other
file types.