Fix proximity sensor issue

Original issue to track: https://jira.cyanogenmod.org/plugins/servlet/mobile#issue/BACON-599
Quotes from Steve Kondik:
1. "Higher overall idle current was isolated to an i2c power management issue, this is resolved with the patches that just went in. We're idling at 3.5mA, which is LOWER than 25R, so yay for us
The proximity sensor issue is harder to reproduce but it's confirmed, we are working on this now."
2. "Proximity sensor issue is fixed now as well. The issue could happen if the proximty sensor didn't warm up fast enough and the device reentered suspend. We'll push this thru an expedited OTA after running the full test suite. Thanks for the feedback."

This commit is to address the second issue and adapt only necessary part of these following patches:
http://review.cyanogenmod.org/#/c/70507/
http://review.cyanogenmod.org/#/c/69169/
http://review.cyanogenmod.org/#/c/70465/

Change-Id: Ifb3bf36a013ce8ebca7b18acd193329c5e621585