Measure total time in state

This measure is not affected by uid removals and is monotonic. That
makes it a good fit for CPU telemetry in statsd.

Bug: 174245730
Test: manually compare total with uid breakdown
Test: atest libtimeinstate_test
Change-Id: I8f17348f6eed49474826a1bd1cbd150207171e2c
3 files changed