Cleanup cached preview images on uninstall

Change-Id: I9267a160fbabeb67ade2f18fdaf8d8c6acc539da
When applied theme is removed, revert to default

Fixes issue where fonts and other resources do not get reverted
properly when an applied theme is uninstalled.

Change-Id: I30c9ea018f8bffc6aff51c5b38ff1e4ec82b7b20
Insert instead of update if theme doesn't exist

This handles the case where an app is being upgraded and previously was
not a theme. and therefore wasn't in the provider.

Change-Id: I7b3f64aed2b78081822cb0f9daf0cbd638e0b15b
Merge "Insert instead of update if theme doesn't exist" into cm-11.0
ThemesProvider: Fix query compilation error

This fixes syntax error when excute the SELECT Clause

06-11 13:45:39.370: E/AndroidRuntime(3359): java.lang.RuntimeException: Unable to start
receiver org.cyanogenmod.themes.provider.AppReceiver: android.database.sqlite.SQLiteException:
near "?": syntax error (code 1): , while compiling: SELECT pkg_name FROM themes WHERE (pkg_name?)

Change-Id: If9857b1db447e8752ddf04ce3f7d2cc84d5b28a5
Automatic translation import

Change-Id: I3d8ee2920861a04e551bc632f2aff48b0733fe7b
Make sure to update theme capabilities.

Change-Id: I42970fd98e629bde8f32d698b67892ba7b8e6965