Ensure cdm clear cache command persists state

This CL ensures that the clear-association-memory-cache shell command
immediately persists all user state before dumping clearing caches.
This prevents state change updates from getting lost.

This is not a critical issue because this shell command is only used
for testing, but it allows for more graceful and reliable test code.

Test: atest CtsCompanionDeviceManagerCoreTestCases
Test: atest CtsCompanionDeviceManagerUiAutomationTestCases
Change-Id: Ib981862c587a86bce57c4a5d67c7c18a40b47235
2 files changed