Fix: wallpaper changes when changing lockscreen WP

Since LockscreenWallpaperPickerActivity did not override
cropImageAndSetWallpaper the homescreen wallpaper was changing
when selecting the default_wallpaper resource.

Change-Id: I26dd28e628a3ef701ad92a81aa80327d3ccba092
Fix side button visibility tracking.

Previously one could e.g. get legacy menu button being visible in
certain scenarios, like this one:
- Open legacy app, e.g. CatLog
- Invoke IME
- Lock screen
- Unlock screen
- Result: Menu button visible in keyguard

Change-Id: Ia796f73ec995ea1cc34d38f8aefdbccda7be7565
frameworks: base: grammar fixes

props to  Boštjan Mejak for letting JIRA know.

JIRA issue: CYAN-4913

Change-Id: I09b742b1935b7ae5a2588ddc2c8c529e4bac0664
Restored original autobrightness speed
The speed was changed from this commit:
https://github.com/CyanogenMod/android_frameworks_base/commit/e941b1e27f6aad

Change-Id: I0be1ebbafc20a067ec3c2c6f9851993182bfc994
Improved the minimum amount of time that must have elapsed for change the rotation

Change-Id: I36f27727bbd5d6d7a192ffb9222223ecda2be0eb
Frameworks: Lockscreen Blur

  If user selects "See through" under screen security,
  the locksceen background will now appear transparent
  with the content behind it blurred.

Modificaitons made to the orginal commit to support Hammerhead and Flo.
It seems full HD images causes rendering artifacts. To prevent this,
we scale the image size to something more manageable.

PS2: Reduce calls to System.Settngs
     Move bitmap scaling to DisplayPowerController
PS3: Fix styling
PS4: Fixes: 1. Black wallpaper after turning off see through
            2. Wallpaper flicker on unlock when blur is enabled
PS5: Ignore status bar and nav bar when capturing screenshots
PS6: 1. Remove content observer and unnecessary calls from viewManager
     2. Restructure the flow of setting the custom image
         * now closely follows setting album art as lockscreen image

Change-Id: I12abd661510ff398251cd404f5aea670f7710789
added FastCharge QS tile
adapted from the code of bigrushdog and kasperhettinga, thank you

Change-Id: I9f43768de609db8e2ded6c11b389696ae9982d80
storage: allow swapping primary storage for apps

Advanced storage settings patch series:
[1/4] vold: allow swapped storage paths at vold init
      http://review.cyanogenmod.org/56515
[2/4] Advanced storage: vold swap storage paths
      http://review.cyanogenmod.org/56516
[3/4] storage: allow swapping primary storage for apps
      http://review.cyanogenmod.org/56950
[4/4] Advanced storage: swap primary storage for apps
      http://review.cyanogenmod.org/56951

By setting the persistent system property
 persist.sys.env.switchexternal=1
the primary device for applications storage will be reported as
/storage/sdcard1. This method currently only works with non-emulated
storage. The path swapping will probably have to be relocated within
getExternalStorage() and other functions emulated storage swap to work.

Change-Id: Ie091eb632280c2dbfd00bbf5f9b0b09be0239234