Backport "Power connect/disconnect notification support" from CM10.1
Originally author: Sam Mortimer
Backported from CM10.1 by: Daveee10