installd: Implement support for userdata snapshot and restore.

Adds two binder APIs:
- snapshotAppData: Makes a copy of the apps credential encrypted
  and/or device encrypted data for a given user to one of
  /data/misc_[ce|de]/rollback. This path is writable only by
  installd.
- restoreAppDataSnapshot: Restores a copy of the apps credential
  encrypted and/or device encrypted data from a snapshot, if one
  exists.

Implemented for use from RollbackManagerService, which will make
a transient copy of an app package as well as its data in order to
roll them back within a specified window.

Bug: 112431924
Test: installd_utils_test, installd_service_test

Change-Id: I3e4d36c11e52fb885b585b1946e215cf986206fd
7 files changed