add criticalBatteryShutdownLevel; fix plugged/charging status

This does two things:

 * Adds a criticalBatteryShutdownLevel config value so device
   maintainers can choose a battery level to force shutdown
   instead of relying on the hardcoded 0% shutdown.

 * Reworks "isPowered/isPluggued/isCharging" code to correctly report
   charging status.  Note that some devices can draw more than 500mA,
   so "plugged" != "charging" (as is assumed in existing code).
   This faulty assumption can result in incorrect charging status
   reported and inability to shutdown at critical battery level.

Change-Id: I6b3282df6513a8c235b0f4cdfd9e16f531e34166

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java