Be sure to shutdown the proximity sensor after display wake

This fixes:
http://review.cyanogenmod.org/#/c/66657/

Change-Id: I1768f13cb48c3e056d0e137642690fc3d650c4ab
ProximityWake: Fix and bring inline with CM

Conflicts:
	core/java/android/os/IPowerManager.aidl

Change-Id: Ib35b83b2558e7516d8e80254b6e649149f270831
PowerManager : Account for values larger than maxRange for proximity

Some devices return a value larger than MaxRange, this patch accounts
for that.

(CM-Gerrit #69169 PS2)

Change-Id: I2692789afb33e777b680105513ff5d547378e78f
Proximity : Check proximity flags only if from native

Change-Id: Id1be619e638de6a45252d8390eab6e38bd5de5a7