Added support for transactions and multi-threading

This pull request adds support for transactions and multi-threading. There are also several performance improvements by reducign chattiness with the gitolite server, and batching changes before committing and pushing them to the gitolite server.