Add mercurial repository support.

Unit tests are not coded for the moment, I would like to discuss if a tiny mercurial repo should be embedded in source tree or remotely on bitbucket or others.
If you're up to it, fix this in the `svnrepo.py` and `gitrepo.py` modules too.

I don't know why we used this approach, using the `HAVE_X` constants makes more sense.