Accumulate and attribute measured Cpu energy in BatteryStats

BatteryExternalStatsWorker will now include measured Cpu Cluster energy
data (if available) when triggering a Cpu update in BatteryStatsImpl.
Using the per cluster per uid duration read from the kernel, the
measured energy can be attributed per cluster and then totaled to get
the Cpu energy consumption of a uid since the last update.

Fixes: 180079165
Test: manual ("adb shell dumpsys batterystats --measured-energy" on an
unplugged PowerStatsHal2.0 enabled device)

Change-Id: I0127bf61decdd5a9a5744e3352d5a3ff3a5fa2fe
7 files changed