Use revision parsing for perforce diffs, refactor pending change posting.

This change uses parse_revision_spec inside the perforce diff routine, and does
some refactoring to clean up the method for posting pending changes. There was
some code in here that theoretically would handle non-pending changes, but
since 'p4 opened' doesn't work for submitted changes, that was effectively dead
code. I'll be handling that later once I implement two-revision diffs.

The one unexpected change in the diff hashes is when we're dealing with moved
files when the server doesn't have the capability. The reason for the hash
change is that the new list of repo files in the test case is iterating in a
different order than the dict.

Testing done:
* Posted changes for pending changesets that involved added, moved, and deleted
  files.
* Ran unit tests

Fixes bug 2604, 2972

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