[AF Sync] React to local changes in metadata sync bridge

This CL re-implements how the new metadata sync bridge reacts to local
changes. This CL reflects the new design for the data&metadata bridge
interaction.

The CL re-introduces a local cache that was recently removed because it
is needed (exactly) for reacting to local changes. I am sorry for the
back-and-forths.

The CL also updates the implementation of Get*Data to load the data from
the cache as this is needed by the unit-tests to be able to test both
writing to cache and writing to the DB.

Bug: 853688
Change-Id: I6de2da7b0126a05ffa13315c8376c43e9cbd5454
Reviewed-on: https://chromium-review.googlesource.com/c/1406711
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622197}
3 files changed