Support "versionDefines" test config argument.
Git: Update repository HEAD after checking out.

Contrary to "git checkout", libgit2's eponymous functions
only updates the working directory. This lead to the hash of
the initially cloned commit to be reported by the DMD/LDC
build systems.
Don't leave outdated LDC versions behind.
Remove unused variable.
Support building GDC from Git.
Be extra careful not to leave outdated compiler installations behind.
Handle strange install dir layout produced by DMD pull request 3798.