Throw NotFound and CannotDereferenceToCommitExceptions

This change is to throw more specific exceptions in several cases when
possible. If an object cannot be found, throw a more specific
NotFoundException. If an object exists but cannot be dereferenced to a
commit when requested, then throw a CannotDereferenceToCommitException.
Introduce RefToMergeNotFetchedException

This adds a  strongly typed exception to indicate when a pull is
performed and a reference for the configured merge branch was not fetched.