Use local repository as reference for publishing (#519)
* Publish using local repo and revision as reference
We still require the remote is ready (in essence, that the local repo is not
ahead of the remote), but now it is simply a matter of issuing `alr publish` or
`alr publish <commit|tag|branch>`, and the corresponding commit will be used.
* Refactor long function name to more sensible one
* Fix comments due to bad refactoring
* Test for publishing from inside a repo
* Fixes uncovered by testsuite
Adding defaults for <URL> <commit> complicates things somewhat as we use local
paths for testing that would otherwise be rejected, so a few corner cases have
to be explicitly considered now.