Extend CommitMessageFetcher to handle non-commit objects

CommitMessageFetcher expected to fetch for commit objects and failed
for non-commit objects.

With the advent of NoteDB, RefUpdatedEvents sometimes contain
non-commit objects. For example `refs/sequences/changes` typically
references a blob. When this ref gets updated, Gerrit sends a
corresponding RefUpdatedEvent with blobs as oldRev and newRev, which
used to trip up CommitMessageFetcher.

To avoid issues, we extend CommitMessageFetcher to work on ids of
arbitrary objects.

Change-Id: I892b9299f73e71660b1a7d77d7f282a4f563001e
2 files changed