Add some ignore files for hg and git
Make tests build standalone

If we try to build the top-level tests using cabal, it fails because
the depsolver ties itself in knots.

The "solution" (similar to that used by many other packages) is to
have a separate fake package that builds the tests.