Collect background stats: scheduled jobs

Added background times and counts for an app's scheduled job usage.
Changes DualTimer to be a subclass of Timer so that background timers
can be easily accessed from the main timer (which is convenient for
jobs, whose ArrayMap of Timers is directly accessed outside of
BatteryStatsImpl).

Bug: 35669746
Test: runtest -x
frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java

Change-Id: Ic1d85db34346ebda94ed39f134fc0794a5877815
(cherry picked from commit d253f537a0cc15851fb0308f3ea287e6bd93dfe6)
3 files changed