Added some mercurial support

I've tried to add the Mercurial equivalents of some git-only places in Composer.

This work is not yet done, as I can't figure out what exactly the root package loader tries to attempt when doing ```git rev-list candidate..branch```. It seems like it's looking for the nearest parent branch or something like that. If someone could explain what this command is trying to do, I can add the hg version (if required).

By the way: It would be nice if there was a way to check if there is a proper ```.git``` or ```.hg``` directory before attempting to execute any commands. This could save a bit time here and there. But when I added a check with ```is_dir()```, the tests failed. And the in the places I've modified, there is no access to the underlying (remote)filesystem, so I had to do the try-git-first-then-try-hg way.