Implement quota calculation for project ID based quota.

Devices launching with R will no longer have the sdcardfs filesystem;
instead, quota tracking on external storage is implemented by project
IDs. Switch over the existing quota calculation to use project IDs when
sdcardfs is not available.

Bug: 146419093
Test: atest StorageHostTest (on devices with and without sdcardfs)
Change-Id: I17925c811b08c7c85fff02ee6e279e4d7586e3ff
diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h
index 6a42026..2503168 100644
--- a/cmds/installd/utils.h
+++ b/cmds/installd/utils.h
@@ -150,6 +150,10 @@
 int prepare_app_cache_dir(const std::string& parent, const char* name, mode_t target_mode,
         uid_t uid, gid_t gid);
 
+bool supports_sdcardfs();
+int64_t get_occupied_app_space_external(const std::string& uuid, int32_t userId, int32_t appId);
+int64_t get_occupied_app_cache_space_external(const std::string& uuid, int32_t userId, int32_t appId);
+
 // Collect all non empty profiles from the global profile directory and
 // put then into profile_paths. The profiles are identified based on PROFILE_EXT extension.
 // If a subdirectory or profile file cannot be opened the method logs a warning and moves on.