Power HAL: disable KSM scanning when screen is off

KSM scanning can keep the CPU busy during otherwise idle periods, which
hurts battery life.  Therefore, when KSM is in use, disable KSM scanning
before the screen turns off and reenable it when the screen turns back
on.

Taken from: http://review.cyanogenmod.org/#/c/62236/