Write change mergeability info to a persistent cache

The mergeability bit and the last SHA-1 it was checked against are not
really properties of the change, but rather properties of the state of
Gerrit's mergeability checker. Moreover, mergeability checking happens
sufficiently often (at least on every branch update) that it would
clutter information in the notedb.

As a first step towards eliminating these fields from Change, start
writing them to a persistent loading cache when the value is
recomputed. Cache only the most recent value for each change.

The cache just records the commit, the branch tip it was tested
against, the submit type, and merge strategy; this result is fixed for
all time (modulo implementation changes) regardless of change IDs.

Change-Id: I0c1c4b73725a6de3fc90b21f3e65714ad2208a6e
5 files changed