Add SCMClient.parse_revision_spec and implement/use it in GitClient.

As part of redoing the revision-range syntax for `rbt post`, I've decided to
add a method to SCMClient that can take in an array of revisions and "parse"
them, returning a dictionary with 'base', 'tip', and optional 'parent_base'
keys. This method does all the hard work of separating out the passed-in
revisions and detecting whether or not a parent diff is required.

This method is currently only implemented for the GitClient. I've added a bunch
of unit tests to make sure it returns the right revisions, and also refactored
the diff generation code to use it for both the `diff` and
`diff_between_revisions` methods.

Testing done:
* Ran unit tests.
* Posted this change with the new code.

Reviewed at https://reviews.reviewboard.org/r/5124/
Fix git-p4 for newer versions of Perforce.

Different versions of perforce / git appear to use various naming
schemes for perforce variables. This fix updates the regular expression
to match two known names for the perforce path variable.

Fixes bug #3169

Reviewed at https://reviews.reviewboard.org/r/5120/
Fix entry point lookups without any custom entry points.

The recent fix for looking up third party entry points was failing if
there weren't any custom entry points registered. Typing a command that
RBTools doesn't supply would raise a StopIteration error. This happened
because the lookup assumed the existence of at least one entry.

It's now a bit more bullet-proof and catches that StopIteration
cleanly.