LockScreen: allow long-press actions from hardware keys (1/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

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java

Change-Id: Iff32736d00ca5d4122f64a6a861bbb0a1de9cca9

Fix custom insecure unlock logic

The previous implementation of lockscreen hardware keys long press
actions has conflicts with the Menu/Home/Back key unlock methods.
This was due to a derp in the switch loop.
This commit fixes this

Change-Id: I03025b8c8217d3bd0999b784b1c3046646bfa70f

Frameworks: Lockscreen minor fixes

- fix for hide lockscreen page hints in landscape
- fix initial  logic rotation lockscreen

Patchset 2
- fix derp

cheers

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetCarousel.java

Change-Id: I19d5f0c5474986bee4ba5a6457ed0f47d530cfba