Git.transact: wrap changes in a git repo in a "transaction".

This snapshots the state of a git repo and if anything goes wrong it
restores that state before re-throwing the error.
Merge branch 'master' of github.com:JuliaLang/julia