healthd: charger: Add backlight control in charging animation

On some targets the FBIOBLANK does not control the backlight. Add the
backlight control in charging animation to make sure the backlight will
be turned on/off successfully.

Change-Id: I3bba3b58daba6cffa4eb1314a6da1542f43e8e47

Signed-off-by: artas182x <artas182x@gmail.com>

Conflicts:
	healthd/healthd_mode_charger.cpp
charger: check the charging_enabled at the beginning of power off charging

Check charging_enabled flag in power off charging process, reboot the
device if charging is disabled to exit power off charging mode.

Change-Id: I11208acb1dd82a06b42911fdbcc7e58f6f97e96c

Signed-off-by: artas182x <artas182x@gmail.com>

Conflicts:
	healthd/healthd_mode_charger.cpp
init: add detection of charging mode

Based on Prashant Somashekar's patch which is in turn based on techomancer's
patch http://goo.gl/I19GG.

When BOARD_CHARGING_MODE_BOOTING_LPM is set, init will read that
value (usually from /sys) and enable charging mode when set to 1.

This differs from the original patch in that Samsung-specific lpm.rc
is not loaded, but instead, init.rc is loaded using the "charger" class,
which is how AOSP devices handle charging.

The change is because the either the SELinux or the init.rc changes is
causing lpm.rc to not work, and porting lpm.rc to the Android system
is easier than trying to fix it.

Change-Id: Ice7a074da7e982f9a64aaa97de28bfcbccdc8b91

Signed-off-by: artas182x <artas182x@gmail.com>

Conflicts:
	init/Android.mk
	init/init.c