healthd: charger: Add tricolor led to indicate battery capacity

Add led to indicate battery capacity when doing off mode charging. The
led behavior is design as below:
   i. 	Shows red led if capacity is lower than 15%.
   ii.	Shows yellow (red + green) led if capacity is
	lower than 90% but higher than 15%.
   iii. Shows green led if capacity is higher than 90%.

Change-Id: If637defec8a04e859b00a6492ec1f95d6bff2200
healthd: charger: Turn off charging animation by power key event

Currently, the charging animation can be turned on by power key event. Add
support to make charging animation can be turned off by power key event.

Change-Id: Icc8101ae3d4fd777efedeff10ca535a9e6e7a57d
healthd: charger: Draw battery capacity in charging animation

Draw a text to show the battery capacity value in charging animation.

Change-Id: I0117fb0aee69181ce0d608ba4b1644fa42cd1a0d
healthd: Support alarm in power off charging mode

To implement this feature need to let the phone reboot some time
earlier than the alarm time.

Change-Id: I6505a99b51932ffa23518769f8fd4d2590021543
init: Fix memory corruption when sanitizing platform paths

This commit fixes code that incorrectly increments s when it
hits the terminator character of the string being sanitized.
This means it will randomly start trashing memory beyond the
end of the string being sanitized until it happens to hit two
NULs (\0\0) which will break it out of the loop.

Change-Id: I76553d7f183236a78a0bc7b408e92559b98f732f
Set level 2