rework powered/plugged/charging logic

 * 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