Generate MIN_VERSION_* macros with cabal

This uses `cabal configure` to determine which exact dependency versions
we are compiling against.

MIN_VERSION_* macros are the standard way to build CPP dependency switches
in Haskell packages, and they replace our custom macros (like PARALLEL3).
We can now conditionally compile against any version of our dependencies,
without first having to manually add a flag via autoconf.

All ghc and hlint invocations were adjusted to take these macros into
account.

We now require hlint >= 1.8.60, which support the --cpp-file option,
and any installed version of cabal.

In addition to providing MIN_VERSION_* macros, the `cabal configure`
step makes the build fail at configuration time if the user tries to
compile against a dependency version we don't support; before, this
case led to type errors which were not clearly user errors.

In order to obtain the sought cabal_macros.h, we have to work around
the fact that cabal does not yet provide a way to build only the macros
(see https://github.com/haskell/cabal/issues/2209).
Ideally, they would be created as part of `cabal configure`, but
unfortunately they are created as the first step of `cabal build`.
Thus we `cabal build` a dummy executable (HaskellPackageVersionsDummy)
in a temporary directory to obtain cabal_macros.h.
Full QuickCheck 2.7 compatibility

This renames the deprecated `printTestCase` to its replacement
`counterexample`, add provides a CPP-guarded fallback for QuickCheck < 2.7.
Cabal: Allow QuickCheck 2.7