Use separate build directories for each version.

If the version in the cabal file changes, ghc needs to recompile
everything. This is very annoying if you're switching between
master and maint-X.Y.Z a lot. This patch changes the build dir
for cabal from dist/ to dist/X.Y.Z/, where X.Y.Z is the version
given in mk/config.mk.in.
Merge branch 'maint-2.4.0'
Bumped version in mk/config.mk.in.