installd: parameterize user data snapshots with snapshot_id

- snapshot_id will be provided by RollbackManagerService and for a given
  rollback will be equal to its rollback_id.
- snapshotAppData now creates a folder to snapshot data to, in case it
  does not exist.
- removed ceDataInode from restoreAppDataSnapshot API, since it's only
  called if users phone is unlocked, meaning that CE data is available and
  doesn't require inode to be accessed.
- refactored installd_service_test to reduce test set up boilerplate.
- added a test to cover case when snapshots for different packages have
  the same snapshot_id.

Bug: 124029909
Test: installd_utils_test installd_service_test, RollbackTest
Change-Id: I4177a44a60cdfdc5429a28c613ce661b24482b8b
diff --git a/cmds/installd/binder/android/os/IInstalld.aidl b/cmds/installd/binder/android/os/IInstalld.aidl
index b345210..63c9765 100644
--- a/cmds/installd/binder/android/os/IInstalld.aidl
+++ b/cmds/installd/binder/android/os/IInstalld.aidl
@@ -106,11 +106,11 @@
         @nullable @utf8InCpp String dexMetadata);
 
     long snapshotAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName,
-            int userId, int storageFlags);
+            int userId, int snapshotId, int storageFlags);
     void restoreAppDataSnapshot(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName,
-            int appId, long ceDataInode, @utf8InCpp String seInfo, int user, int storageflags);
+            int appId, @utf8InCpp String seInfo, int user, int snapshotId, int storageflags);
     void destroyAppDataSnapshot(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName,
-            int userId, long ceSnapshotInode, int storageFlags);
+            int userId, long ceSnapshotInode, int snapshotId, int storageFlags);
 
     const int FLAG_STORAGE_DE = 0x1;
     const int FLAG_STORAGE_CE = 0x2;