Wire up storage stats API to installd.

Now that installd has the implementation details we need, we can wire
up the public APIs to use them.

Shuffle APIs around a bit so that StorageStats can be reused for both
UID and UserHandle results, and rename StorageSummary to
ExternalStorageStats.  Provide getTotalBytes() and getFreeBytes() as
first-class methods so we can answer those questions quickly without
paying the cost of measuring external storage details.

Current costs on a typical device with a test account after flushing
dentry caches:

queryStatsForUid() manual: 6922ms
queryStatsForUid() quota: 525ms

queryStatsForUser() manual: 1686ms
queryStatsForUser() quota: 113ms

queryExternalStatsForUser() manual: 42ms
queryExternalStatsForUser() quota: 2ms

For verification purposes, a new "fw.verify_storage" system property
can be set to compute both manual and quota statistics, and log any
discrepancies.

Test: builds, boots
Bug: 27948817, 32206268
Change-Id: I4ea3df3372a7379aa8cf4c20c44120c8f0702c15
diff --git a/Android.mk b/Android.mk
index 8c0c640..2ea22f3 100644
--- a/Android.mk
+++ b/Android.mk
@@ -690,8 +690,8 @@
 	frameworks/base/core/java/android/service/notification/StatusBarNotification.aidl \
 	frameworks/base/core/java/android/service/chooser/ChooserTarget.aidl \
 	frameworks/base/core/java/android/speech/tts/Voice.aidl \
+	frameworks/base/core/java/android/app/usage/ExternalStorageStats.aidl \
 	frameworks/base/core/java/android/app/usage/StorageStats.aidl \
-	frameworks/base/core/java/android/app/usage/StorageSummary.aidl \
 	frameworks/base/core/java/android/app/usage/UsageEvents.aidl \
 	frameworks/base/core/java/android/app/Notification.aidl \
 	frameworks/base/core/java/android/app/NotificationManager.aidl \