PowerMenu : Improve keyguard filtered actions

Replaces the check for visibility of lockscreen with the state
of the keyguard instead. This avoids the situation where actions
returning false from showDuringKeyguard, are still shown if user enters
emergency call screen.

Change-Id: Idb5df14813d9479bd4178dbb9eb3b91cbecda5de
Add a config resource to force HDMI rotation on some devices.

If the hardware composer HAL does not provide full support for
multiple displays, it may be necessary to force the HDMI rotation
when not docked.  (When docked, we can use the dock's orientation.)

This configuration is not expected to be used on newer devices
with the requisite HAL support and may be removed in the future.

Bug: 8511721
Change-Id: I1ff50f00ee7fe621aceff94bd938ecf6385c3f38

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
DeviceKeyHandler: Increase handler priority

Allow DeviceKeyHandler to have higher priority when handling user keystrokes.

Patchset 2: Update commit message
Patchset 3: Rebased
Patchset 4: Fixed needed ref
Patchset 5: Rebased

Needed by http://review.cyanogenmod.org/#/c/35064

Change-Id: I60871052aaae0af7d864113f00dbdf9ba5200f2e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Allow applications to show the navigation bar in expanded desktop mode.

This is used by the settings app to show the navigation bar when editing
it.

Change-Id: Idc8fa5e49f31175dea603d7f1a1ef94ffab7249d

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java