Add caching

Added a bit of caching to the git vcs client so that it can avoid doing multiple fetch commands on the same repository.

Caching is controlled by a flag and turned off by default because it isn't complete; running the tests with caching enabled causes the tests to fail, but it can speed up operations over a slow internet connection significantly.