Change the return type of ChangeNotes.getChangeMessages()

Changed ChangeNotes so that ChangeNotes.getChangeMessages()
returns a mapping of PatchSet IDs to ChangeMessages instead
of Strings. This allows us to keep the metadata about each
ChangeMessage (i.e. the related patchset, timestamp,
etc).

To construct ChangeMessages, we used the SHA-1 of the
commit in the notedb graph as the uuid for the Key. We
needed that unique identifier for the ChangeMessage because
it's documented in the REST API, but its format wasn't
documented, so it didn't need to be a UUID. The SHA-1 of the
commit should be unique enough.  Note that IDs of existing
messages will change after converting a site to notedb. This
should be fine though because no API actually reads the UUID
field (either the external REST API or anything internal in
Gerrit).

Change-Id: I55a16419cfd73cecf21d97c5a4040f5b6932df32
2 files changed