Added Caching for PreProcessed PNGs

Added a cache management system for pre-processed PNG files
along with unit tests. The cache system will be used if
the --no-crunch flag is passed to AAPT during the package
phase. The cache can be updated by a call to 'aapt crunch'
(see usage statement). Also put in benchmarking code.

Change-Id: I58271fb2ee2f5f9075fd74d4ff6f15e7afabd05c
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 8447d74..3bc5fa1 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -1504,3 +1504,25 @@
     }
     return retVal;
 }
+
+/*
+ * Do PNG Crunching
+ * PRECONDITIONS
+ *  -S flag points to a source directory containing drawable* folders
+ *  -C flag points to destination directory. The folder structure in the
+ *     source directory will be mirrored to the destination (cache) directory
+ *
+ * POSTCONDITIONS
+ *  Destination directory will be updated to match the PNG files in
+ *  the source directory. 
+ */
+int doCrunch(Bundle* bundle)
+{
+    fprintf(stdout, "Crunching PNG Files in ");
+    fprintf(stdout, "source dir: %s\n", bundle->getResourceSourceDirs()[0]);
+    fprintf(stdout, "To destination dir: %s\n", bundle->getCrunchedOutputDir());
+
+    updatePreProcessedCache(bundle);
+
+    return NO_ERROR;
+}