[DeviceInfo USS] Fix the bridge leaking metadata orphans

This CL makes the device info USS bridge more robust in handling
ApplySyncChanges(). Previously, in a shutdown race condition, the bridge
could receive such calls when the device info is not available any more.
This could lead to the bridge not acting on the ApplySyncChanges() call,
not deleting any metadata.

This CL caches the current guid (which is stable between OnSyncStarting
calls) in the bridge.

Bug: 871733
Change-Id: I18d0bdcbcd9677e21196ee986a6af40a5abb29d9
Reviewed-on: https://chromium-review.googlesource.com/c/1273042
Commit-Queue: Jan Krcal <[email protected]>
Reviewed-by: Mikel Astiz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#610548}
2 files changed