[repository] Add custom working revision

The repository API can be made more useful by working not only on the current HEAD, but working on a custom working revision.  this allows workflows to take a branch name as an argument and use that as a basis for workflows like arc diff.