Add MultiStateCounter

This native object is used to track values per-state. For example,
if the state changes from 0 to 1 between two updateValue calls,
the delta between the values is distributed to the states 0 and 1
in accordance with the time spent in those states.

Bug: 197162116
Test: atest libbattery_test

Change-Id: Ie304db5c93f4aa9676d12d0a8ab53b6867b24fff
7 files changed