ProximityWake: Squash and port from CyanogenMod
PS1: Add support for checking proximity when waking device
PS2: Fix proximity wakeup reference
PS3: Be sure to shutdown the proximity sensor after display wake
PS4: Check proximity flags only if from native

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I5d09f6480b3e0b3a059bcc990f156117f4250483