libtimeinstate: add getCpuFreqs() function

Currently the KernelCpuUidFreqTimeReader reads the first line of
/proc/uid_time_in_state to determine a device's available CPU
frequencies, but libtimeinstate already reads this information from
sysfs files that are supported upstream. Add a function to provide
this information to libtimeinstate's users & eliminate the need to
read the proc file for this data.
Add a sanity check in libtimeinstate_test to confirm that
getCpuFreqs() and getUidCpuFreqTimes() report the same number of
frequencies for each cluster.

Bug: 138317993
Test: libtimeinstate_test passes
Change-Id: I3e8c632d14bbeb552d7e52bd83a9b4a64dec408d
Signed-off-by: Connor O'Brien <connoro@google.com>
3 files changed