Use __import__ checks for skipping bzr/mercurial

Closes #1015
Use SkipTest for skipping tests
Use setUpClass/tearDownClass to deal with VCS repositories
Merge pull request #1032 from ZyX-I/skip-vcs-tests

Refactor VCS tests