review/git-review: apply changes from adg's review

From golang.org/cl/1518.
While we are here, fix HasStagedChanges and HasUnstagedChanges
so that git submit reports the changes. Tests to follow in a non-TBR review.

Change-Id: I68fb18f53c1b5e8a71f88e7827b4888e2afd6f36
Reviewed-on: https://go-review.googlesource.com/1585
Reviewed-by: Russ Cox <rsc@golang.org>