Port: Wake on plug (1/2)

Change-Id: I5e415df0b47d4927503d9f59d6c5a766f6986005

Pulled together from:

Display options: allow configuration of wake on plug behavior (2/2)
The PowerManager now checks Settings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED
to determine wake-on-plug behavior.  The configuration option
config_unplugTurnsOnScreen is used as the default value of the setting.

PS 2: Fix formatting of if statement

Cherry-picked from: I062794828831a2b6faf4293579103d2251f1bdd0

Change-Id: I7eefff468a64c04e536c377cff3c740a7e568ade

------------------

Forward port "Display options: allow configuration of wake on plug be…
…havior"

From http://review.cyanogenmod.org/#/c/47159/

Change-Id: If1d50cbad76763bb8e12b2e7a4f7c21f42a58f31