Fix theme provider crashing for non-primary user.

PackageManagerService's context is for user 0, so if the theme provider
for other users was invoking the getInstalledThemePackages() method, the
themes provider crashed as it doesn't have the INTERACT_ACROSS_USERS
permission.
Fix that (and simplify code) by making getInstalledThemePackages()
return the installed themes for the current user, which was probably the
intent anyway.

Change-Id: I02002cee005b74128f3b2f7cc7a93b9b8514f1f3
Fix a number of multi-user bugs.

In particular, expanded desktop mode couldn't be enabled for non-primary
users as GlobalActions wrote the setting to the primary user's settings
DB.
Also fix some other cases where we didn't track the settings for
multi-user correctly.

Change-Id: I3bec45cb84903120639c2e85c1d71ec9a491933c
Merge "Fix a number of multi-user bugs." into cm-10.1
framework: merge CyanogenMod

Change-Id: I9a484b16e443a64ac80777e7c54c897096249f52
framework: code style format

Change-Id: Ifb46781b519f6fc0dd81fa01098b260cc285f592