have rebuildstaging show more details on a conflict

- when there is a merge conflict rebuildstaging will find the
  first commit on each branch that prevents the other from being
  merged in
- this functionality is also accessible as a separate script:
  $ python scripts/gitutils.py show-conflict <branch1> <branch2>
- reusable git-related utilities are now in scripts/gitutils.py
- added OriginalBranch context manager that makes sure you end up
  on the branch you started out on, even if the code block
  throws an exception
- use OriginalBranch throughout to improve the experience of
  rebuildstaging
- git_current_branch now returns either a branch or a commit if not on
  any branch