[Sync::USS] Issue password db clean up in case of encryption failure.

The password manager stores the password in an encrypted form.
The decryption key is stored in platform-specific storage, but in
case that decryption key is lost (e.g. migrating the user directory
from a machine to another), the passwords in the stores will always
be undecryptable.

For syncing user, during initial merge, we try to clean up the password
store by deleting all undecryptable passwords. At merge time, the store
is empty and hence will be filled with data from the sync server.

This functionality has been implemented in the PasswordSyncableService
in the directory implementation. This CL implements the same
functionality in the PasswordSyncBridge the USS counter part.

It is worth noting though that the merge logic is run on every start
in the directory, while in USS, it's invoked only during initial sync.

Bug: 935996,902349
Change-Id: I755f887a3849176cb3b9a7e05f3d4c333f8f623c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503315
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637673}
3 files changed