Shutdown Trac environment in tearDown.

Otherwise the database connection is reused between tests while the
underlying database has changed.
Add support for cached git repositories.

Fix #6.