Fix crash while installing themes rapidly

A theme can be installed on a PM or theme service thread.
If multiple themes are being installed at once and one of
those themes happens to be part of the boot config, then
two themes will try to be installed at the same time. This
causes problems with files like the temp AndroidManfiest.xml
which are not designed to be multi-thread safe.

This patch fixes the issue by making sure a theme is
never installed in a PM thread except during boot.

Change-Id: Ic9a0ffe43d0199a2a893579f3d2dbb6d9340e7b4
Merge remote-tracking branch 'cyanogenmod/cm-11.0' into cm-11.0