Aproach CM in menu key remap

Menu key remap codes was already added by us in this commit: https://github.com/crdroidandroid/android_frameworks_base/commit/5c6b8b69bfc07e728bd3581166097f2133f7753c and here we're only trying to get cloests as possible with CyanogenMod codes

Based on this commit: https://github.com/CyanogenMod/android_frameworks_base/commit/10656747ca0057909d71767aff24bd5b9a0a0e7c

Again, a BIG thanks to all CM team!

(cherry picked from commit e7e65f5933610dc6a2163ec5ebcec4335229ced8)
Move hasHwKeysEnabled() and updateKeyAssignments() bellow navbar on/off detection

Based here: https://github.com/CyanogenMod/android_frameworks_base/commit/a8909012f7a78c2399f603c809a6a4e9b3dfa5c8

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

(cherry picked from commit 15e2dcfc39b8b0a7797ad960107ae79281076f6d)
Now is hasPermanentMenuKey()! And fix the build

(cherry picked from commit 9b9c54ad238f4b0bb3a28eed5d1b5bc135294654)