Rewrites CTS test for key/value backup

Previous implementation used logcat as means of communication between
the test app on the device and the host side of the test. Due to the
nature of logcat that proved to be unreliable and flaky.

New implementation uses device-side test routines to save, read and
verify shared preferences and files. The host side is used to drive the
test flow, install and uninstall the test app, run backup and restore commands.

Test: cts-tradefed run cts -m CtsBackupHostTestCases -t android.cts.backup.KeyValueBackupRestoreHostSideTest
Bug: 38331563
Change-Id: I0d3082c7b0088965f9d018aeb35eae6244f80018
15 files changed