BatteryStatsImpl: SparseDoubleArray

As a temporary measure, a Map<Uid,Double> had been
used in intermediate calculations to store each uids
measured energy values. For efficiency reasons, we convert
this to a SparseDoubleArray, which we implement here.

This is an alternative solution to ag/13907602.

Bug: 182845832
Test: atest BatteryStatsTests
Change-Id: Id5696e5fb6814da0889fde12f4bb8d2b5427c6fe
1 file changed