Implement parse_revision_spec for mercurial.

This change implements revision parsing for mercurial. This currently handles
all of the functionality that's currently supported, handling zero, one, or two
revisions. Parent diffs are currently not supported, for a couple different
reasons. Parent diffs with zero arguments are easy, but the --parent argument
is currently used as a way of specifying the remote branch. For one or two
arguments, we need to detect if the base revision is outgoing, but I haven't
entirely figured out how to do that yet.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5162/