i#118517# - Update twain to version 2.1 with support for Apple and UNIX.
i#118517# - Update twain to version 2.1 with support for Apple and UNIX.

Mingw apparently tries to pass as GNUC and WIN32/64 so we detect it early and force it to work like in previous versions.

Cherry-picked from:

e1431bbb4eff94d7c2ca1e0660a13806cd6489f5

Also contains:

f30110565adafc75feb73eac9707d6d5f86f90f4 - Fix issue with twain header.
1d6adce05b0d7737268be32b1c24aef8254f48b2 - Minor style fix.

Conflicts:
	twain/inc/twain.h

Change-Id: I67c557b81661bc91e299309ade70d603160b6bca
Reviewed-on: https://gerrit.libreoffice.org/6508
Reviewed-by: Caolán McNamara <301f5784f9f6aac04077f24f1e5abc31af69d401@redhat.com>
Tested-by: Caolán McNamara <301f5784f9f6aac04077f24f1e5abc31af69d401@redhat.com>

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core