Travis CI:
Replace GCC4.9 64-bit with GCC7 64-bit.
Replace GCC5 32-bit with GCC7 32-bit.
Move 64-bit to top of matrix so it gets built first (ccache doesn't work
on the 64-bit build and I don't know why (it works locally), so it takes
the longest to build).
AppVeyor:
Add VS2017 build job.
Travis CI now takes into account the environment variables when
generating the cache hash. So the workaround of appending random unique
stuff to "compiler" is now unnecessary.
Also make the build noisier to prevent some build failures when download
speeds are slow from whatever repository.
Note: The 64-bit devel build currently doesn't benefit from ccache for
whatever reason.
[skip appveyor]
Build with gcc-5 (whatever the ubuntu toolchain ppa uses - currently
gcc-5.2), gcc-4.9 and clang-3.7.
Instead of adding everything into the yml file, I've split off most of
the work into a separate shell script. It's easier to maintain and
extend that way, and Travis CI also recommends to do it this way.