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>
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: 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
Merge remote-tracking branch 'aosp/jb-mr1-release' into jellybean

Conflicts:
	adb/Android.mk
	charger/Android.mk
	rootdir/init.rc

Change-Id: Icbec60f0ce6dc35e816cdd107fea6b643f15dee2
Merge remote-tracking branch 'pa/jellybean' into jellybean

Conflicts:
	rootdir/init.rc