Add a tool to convert git revision-id's to diff-id's.
Add a tool to convert git revision-id's to diff-id's.

Summary:
A "diff-id" is an identifier that refers to the most recent version of
a revision (that is, the state of the repo after running the most
recent `arc diff`), and phabricator creates a git tag for every
diff-id, that looks like `phabricator/diff/192259`.  We can use this
with `git checkout` and any other git tool.  But it's nice to be able
to convert the revision-id to the diff-id automatically, which this
does.

A future diff will add support for calling this to `git co`.

Add a `--tag` flag to make it easier to use with `git co`.

Test Plan:
I ran
   % revisionid-to-diffid.sh D1
   1321
   % revisionid-to-diffid.sh d43107
   d43107
   % revisionid-to-diffid.sh D1000343
   D1000343

This captures each of the error cases I know how to test: success,
not-a-diff-revision, and no-id-found.

   % revisionid-to-diffid.sh --tag
   USAGE: ...
   % revisionid-to-diffid.sh --tag D1
   phabricator/diff/1321
   % revisionid-to-diffid.sh --tag D100000343
   D100000343
which is correct.  We still notice there's no arg, we add the tag
correctly when we can, and when we leave the input unchanged it is
really unchanged.

Reviewers: benkraft

Reviewed By: benkraft

Subscribers: #infrastructure

Differential Revision: https://phabricator.khanacademy.org/D43292

Khan/git-workflow,Khan/git-workflow