Detect whether overflow button should be shown based on menu key state

Some devices may have hardware keys but not contain a hardware menu key.
Hardware keys are also able to remapped. The overflow button detection logic
currently does not take that into account. This change allows detects
whether any key is capable of emitting the MENU_ACTION keystroke in
order to determine whether the overflow button should be shown or not.

Change-Id: I8699bd0242560314f8eadc54b187c69c992cf875

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
	tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
Fix a number of multi-user bugs.

In particular, expanded desktop mode couldn't be enabled for non-primary
users as GlobalActions wrote the setting to the primary user's settings
DB.
Also fix some other cases where we didn't track the settings for
multi-user correctly.

Change-Id: I3bec45cb84903120639c2e85c1d71ec9a491933c

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
[2/2] Permit home button wake to be configurable

Change-Id: Ie52247d5c23c8f840ababc880dd41992049cefd1
Always prevent wake on home keypress when kl config does not contain WAKE

http://review.cyanogenmod.org/#/c/43124/ introduced a change in behaviour
where the home key could wake a device even if the kl config lacked
the WAKE option.  This fix restores the original behaviour.

Change-Id: I56fc23244957a5738823b5e59f0a719670b41f6d