Android: fix battery status API charging state.
Define charging attribute in terms of whether the device is
plugged in or not. Previously it was defined in terms of
BATTERY_STATUS_DISCHARGING property but some phones report
BATTERY_STATUS_NOT_CHARGING when the battery is not charging.
Also modified the tests accordingly.
TEST=http://jsbin.com/battery-status-test
BUG=360068
Review URL: https://codereview.chromium.org/
451773002
Cr-Commit-Position: refs/heads/master@{#288361}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288361 0039d316-1c4b-4281-b951-d872f2087c98