git-review: add support for non-master origin branches

The basic idea is that each work branch explicitly tracks
a particular origin branch, instead of assuming that everything
tracks "master". In addition to enabling development branches
like dev.cc or dev.garbage, this makes plain 'git pull' work
better in work branches.

In fact, after this commit, 'git sync' could be rewritten to be
nothing more than 'git pull -r'.

- disallow names with dots in 'git-review change':
  we are reserving that set of names for our own use
  (dev.garbage, release-branch.go1.4, work.uploaded and so on)

- make Branch methods invoke git on demand as called
- always use Branch, not branch name, for inspecting local branches
- start test framework
- add basic tests for change
- add 'git-review hooks' for people not using git-review otherwise
- delete revert (at least for now)

Change-Id: Ib9f51a78a1b23ce7514c938da246afc1377fde9e
Reviewed-on: https://go-review.googlesource.com/1221
Reviewed-by: Andrew Gerrand <adg@golang.org>