Tests fail when Mercurial or git aren't available

Skip Mercurial/git tests when those systems arn't available.

Noticed that tests were failing since I don't have Mercurial installed. This PR makes it so that it checks whether git or Mercurial are installed before running tests that use them. If they arn't available, it just marks the test as skipped.

With this applied, running `phpunit -v` without Mercurial installed, results in the following:
```
Time: 3 seconds, Memory: 32.50Mb

There was 1 skipped test:

1) Composer\Test\Package\Archiver\ArchivableFilesFinderTest::testHgExcludes
Mercurial is not available.

tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php:150
/usr/share/php/PHPUnit/TextUI/Command.php:192
/usr/share/php/PHPUnit/TextUI/Command.php:130
OK, but incomplete or skipped tests!
Tests: 944, Assertions: 1671, Skipped: 1.
```