Add installd method to delete CE snapshots.

This adds a new installd service method to allow CE snapshots to be
deleted.

The existing method for deleting snapshots - destroyAppDataSnapshot -
does not work if the user is not unlocked. Although it takes the inode
of the snapshot directory, it still cannot access the parent directory
and so the delete fails.

The new method is destroyCeSnapshotsNotSpecified, as it deletes all
CE snapshots for the specified user, except for those with snapshot ids
in a provided list.

RollbackManager will call this method when the user unlocks, passing a
list of all current rollbacks. This will ensure that all expired
snapshots are deleted. It will also allow any "orphaned" snapshots
(e.g. from tests or previous snapshots that have not been deleted) to
be cleaned up.

The new method is expected to be called when the user has unlocked -
it will fail if the user is not unlocked.

Bug: 147806409
Test: atest AppDataSnapshotTest#DestroyCeSnapshotsNotSpecified (new test)

Change-Id: Iab048733ac794261f906ffb9e3b19f331dc67a76
Merged-In: Iab048733ac794261f906ffb9e3b19f331dc67a76
4 files changed