Squash all 4.2.2 changes into one

libsuspend: compile as a static library

Compile libsuspend as a static library as well, currently needed by the charger
code in some cases.

Related-to-bug: 7429504
Change-Id: I113017c2c855f915b77c76d8934b6e57c0bb532c
Signed-off-by: Iliyan Malchev <malchev@google.com>

init.usb.rc: set sys.usb.config to none before changing it

On encrypted devices, persistent properties are loaded after the device
is decrypted. To properly change sys.usb.config to its persistent value,
it must first be set to "none" and then to ${persist.sys.usb.config}.

Bug: 7678835
Change-Id: I4f91245cedc04e3178ce9cee21390f5b657733c9

charger: suspend enable in charger mode

To reduce power consumption after charging completion, enable suspend when LCD
is turned off.

Bug: 7429504
Change-Id: I34731dc392661c9051a20cea74f70d94a8aaeb42
Signed-off-by: Iliyan Malchev <malchev@google.com>

charger: fix build

Looks like libsuspend is not available on all platforms.

Change-Id: Ic32dc93221f3c488e846da35235f247f4ddb4c69
Signed-off-by: Iliyan Malchev <malchev@google.com>

charger: Do not suspend when disconnecting from charger

The device should be power off when disconnecting from charger.
If the device enter to suspend, the device couldn't handle the power off
process. So the device shouldn't suspend to handle the power off at that time

Bug: 7429504
Change-Id: I9a0a60e53f315cd83550dc730a33bc7bd464ef67

rootdir: init.rc: set perms for cpufreq governor boostpulse_duration

Change-Id: I09b9a1ed548e4ffe1232f583e8ff5f026760f616

Conflicts:

	rootdir/init.rc