Provide a better error message when hg upstream is empty.

Running `rbt post` or `rbt diff` will now print an error message that explains
that it expects the upstream repository not to be empty. The old behaviour was
to print out a cryptic error message (`CRITICAL: list index out of range`).
This new behaviour indicates the source of the underlying problem.

Testing Done:
Tested `rbt diff` with an empty Mercurial upstream repository. It now prints
the correct error message instead of the cryptic one.

Bugs closed: 3565

Reviewed at https://reviews.reviewboard.org/r/6428/
Merge branch 'release-0.6.x'