Add test for jar_publish.  This required some refactoring so that functions could be mocked.

Includes a few minor cleanups to comments, error messages, docstrings,
etc.  This is in preparation for some improvements to how the scm integration is done.

Testing Done:
Ran the new tests and the integration tests.

Reviewed at https://rbcommons.com/s/twitter/r/1082/