Trim both internal and adopted private storage.

Refactor fstrim code to be encapsulated in unique task object, and
give it option of benchmarking when finished.  Trimming now includes
both storage from fstab and adopted private volumes.  Cleaner timing
stats are logged for each unique volume.

Add wakelock during ongoing async move tasks.  Push disk sysfs path
to framework so it can parse any SD card registers as desired.

Bug: 21831325
Change-Id: I76577685f5cae4929c251ad314ffdaeb5eb1c8bf
diff --git a/Utils.cpp b/Utils.cpp
index ec9c906..06222c3 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -22,6 +22,7 @@
 #include <base/logging.h>
 #include <base/stringprintf.h>
 #include <cutils/fs.h>
+#include <cutils/properties.h>
 #include <private/android_filesystem_config.h>
 #include <logwrap/logwrap.h>
 
@@ -532,5 +533,11 @@
     }
 }
 
+std::string DefaultFstabPath() {
+    char hardware[PROPERTY_VALUE_MAX];
+    property_get("ro.hardware", hardware, "");
+    return StringPrintf("/fstab.%s", hardware);
+}
+
 }  // namespace vold
 }  // namespace android