PhoneWindowManager: add missing hardware custom key binding code

*original code by Phil Tunstall http://review.cyanogenmod.org/#/c/27963/

*Improvements to code made by CyanogenMod and rebased for kitkat here
 https://github.com/CyanogenMod/android_frameworks_base/commit/3b6110478e8fca756ffeded437e1d401e9057b06

*Part 1 of code merged here
 https://github.com/AOKP/frameworks_base/commit/aabea3b3422e64cea8eea338b31ecb3745e7bc10
 https://github.com/AOKP/frameworks_base/commit/4fad16a04396998756992255c0216959b99ca115

*Also depends on http://gerrit.aokp.co/#/c/13605/

*Current button actions for home can be set via fw/base overlay.
 This is very useful for devices such as m7 that have no menu key
 since actions like double-tap home > menu can be set. Once RC is
 implemented, the ability to change actions on the fly can be introduced.

Change-Id: I5cff02037bba4eabc924c978516f95b3a371955f
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
input: Add workaround for broken hardware keyboard support

* Add workaround var for devices with broken kernels

Change-Id: Ib6ade70f399067469ba5aece48c6ec4608125d75
Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>