Remove hard dependency on HG for tests.

The tests for the commits and branches resources used a mercurial repository to
test for repos that didn't support the calls, but didn't check to see if hg was
installed. This resulted in tracebacks for these two tests. I've changed this
to use the CVS tool for these tests instead, which doesn't have any external
dependencies.

There's also one test in the diffviewer code that just should be skipped when
mercurial isn't installed.

Testing done: Ran unit tests
Reviewed at https://reviews.reviewboard.org/r/4709/