Cleanup: Make SyncServiceCrypto Reset()able

In some circumstances, ProfileSyncService wants to fully reset
SyncServiceCrypto's state. Currently, it destroys and recreated the
whole object. That works, but it's problematic if we want to pass
pointers to the SyncServiceCrypto object elsewhere.
Instead, this CL adds a Reset() method to SyncServiceCrypto. For
convenient implementation, and to make sure *everything* gets reset,
all the mutable state gets wrapped into a new struct.

Bug: 884159
Change-Id: Ia2590301a6236461e4df20d7f83fee5599e5483c
Reviewed-on: https://chromium-review.googlesource.com/c/1286424
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600705}
4 files changed