aapt: Preprocess images in parallel.

Currently hardcoded to use up to 4 threads.

This change substantially reduces the amount of time spent
preprocessing framework resources to just a few seconds.

Change-Id: I02fdd283fb529a152aeb22ac87f278779fd77983
diff --git a/tools/aapt/Images.cpp b/tools/aapt/Images.cpp
index 6402e3c..2b9b056 100644
--- a/tools/aapt/Images.cpp
+++ b/tools/aapt/Images.cpp
@@ -964,7 +964,7 @@
                  compression_type));
 }
 
-status_t preProcessImage(Bundle* bundle, const sp<AaptAssets>& assets,
+status_t preProcessImage(const Bundle* bundle, const sp<AaptAssets>& assets,
                          const sp<AaptFile>& file, String8* outNewLeafName)
 {
     String8 ext(file->getPath().getPathExtension());
@@ -1084,7 +1084,7 @@
     return error;
 }
 
-status_t preProcessImageToCache(Bundle* bundle, String8 source, String8 dest)
+status_t preProcessImageToCache(const Bundle* bundle, const String8& source, const String8& dest)
 {
     png_structp read_ptr = NULL;
     png_infop read_info = NULL;