base: Fix screen on stats after a boot

Prior to this change, the following sequence:

  * Turn the display off
  * Issue a reboot via adb
  * Unlock the device (after rebooting) before the screen turns off

results in the screen being on but the battery stats not reflecting
this fact.

In general, the mismatch occurs when either there is no serialized
battery stats state or when it is serialized in a state where the
screen is off.

Change-Id: I17374553fae6a08a1be8fdf445967509474177a9
Merge "base: Fix screen on stats after a boot" into cm-11.0
Status bar clock and date customization (1/2)

Thanks SlimRoms for this codes.
Based on this commit: SlimRoms/frameworks_base@39545c5

Change-Id: Ib13e7fd18ae2f22c12eedb8adbae0127822faa6e
Fix icons overflowing status bar view in center clock and date layout

Change-Id: I43829f58330357de7a09d8eb80141a6385aef533
Take date into account to not overflow icons in stock or center clock
- This commit complements this other: https://github.com/cristianomatos/android_frameworks_base/commit/0f1165e0149850107314b9781acf2c2b9994f8e7

Change-Id: I469aedf2abb811edbe180a397480829f33ea3245
Fix for Lock before unlock (read description)
- Using lock before unlock combined with patterm pin or password when try to unlock using any app or activity instead of normal lock (padlock shortcut) the unlock process only work if we enter the method two times and not in first attempt.

Change-Id: I60c0ec22d7b0278fd0e3b69c42fad6e2afdd5b92
Merge cm 'branch cm-11.0' into dcm-11.0