Themes: Only process themes that are applied during boot

Currently, the PackageManagerService will process all themes and
ensure their resources are compiled and available to the system.
This is highly inefficient and can bog the system down when booting.

This patch will only process the themes that are currently applied
durring boot and lets the ThemeService take care of queuing up the
others for processing.   This reduces boot time considerably,
especially when the user has many themes installed.

Change-Id: I52168a1751ad3bfc458048dd1558ad71cc16317a
Broadcast an intent to mediascanner after executing screencap

PS2: Fix for spaces in file names

After doing screencap /sdcard/test.png in shell the screenshot is captured
but the gallery is not updated.
So we should broadcast the intent android.intent.action.MEDIA_SCANNER_SCAN_FILE
for the image to show up in gallery.

Change-Id: I8e384865082c717842d70d376d5828d74a2ad780
Signed-off-by: Umair Khan <omerjerk@gmail.com>
Merge remote-tracking branch 'upstream/android-4.4' into android-4.4