LockScreen: allow long-press actions from hardware keys (2/2)

Allow following actions with button long-presses on lockscreen:
- toggle flashlight (if available)
- play/pause/next/previous track selection
- toggle silent mode
Allow customizing of back, menu, and home buttons. Search
button events are completely ignored on the lockscreen.
Auto-detect hardware keys, only show appropriate menu
options based on the actual hardware keys available on the
device (or completely hide if there are no hardware keys).
Based largely on Danny Baumann's work from gingerbread.
Ported from CM10
Change-Id: I36ea5eb7e93d68de872536dc6d7e93f99ba1621f
Keyguard: Fix for home wake/unlock
sometimes device is waking and unlocking during the same keypress.
Change-Id: I72ea7611d39aac0cd03dfd5aa7036aeef7600140
Use sticky broadcast to convey torch state (1/2).
It doesn't really make sense to store the (non-persistent) state of the
torch in a (persistent) setting. As the torch is sending a broadcast
anyway, make that broadcast sticky and use it to convey the state.
Also unify the torch constants (actions, extras, activity names) at a
common place.
Change-Id: If845bef27cc79990794aa748dce18cfea3bac1f5
Fix Home/Menu/Back keys' unlock
Change-Id: Ibd3842b6ad8e037a2a9f8eb581e7c55900017b0f
LockScreen: allow hardware key longpress to put device to sleep
Change-Id: I54260e21c462bcabd9b6383e22f44d644630b4d3
settings: Deprecate has_led_flash, move to framework.
 * We need this to configure default tiles in SystemUI so move it.
 * Leave the old one in place so we don't kill every device.
Change-Id: I883f9595f74ab52c8c8152e0105400aaefff4afe
LockScreen: allow hardware key longpress to put device to sleep
Change-Id: I251e72cda94f88de3715d818ba62e796e3b2ccd0
Allow changing screen-off animation (2/2)

* Allow enabling/disabling screen-off animation
* Allow selection between fade & crt effects if the device allows it

Change-Id: I5ebfab22e68ea34e3babfaacd9c8103e25932d3d
Settings Feng shui

Change-Id: I1e9f5ef9164529fdde344f1aa780b81f8ac4aaee