Support cross-compiling with MinGW + testing of "Windows" builds

Cross-compiling can be done by passing `-host=i686-w64-mingw32` (32bit) or `-host=x86_64-w64-mingw32` (64bit) to `configure`. This pull request also sets up automatic testing the "Windows" builds using wine/wine64 which should hopefully find obvious errors in the Windows code paths.

(Sorry about the number of commits, getting this to work in travis took some time...)