[metrics] Move core metrics code to libartbase
We would like to be able to use ART's metrics system in places where
we do not have access to the runtime. This CL splits the metrics code
into the core implementation of the counters and histograms and the
background reporting thread. The reporting thread was the only part
that had dependencies on the runtime, so this remains in the runtime.
The bulk of the metrics code moves to libartbase so that it can be
used in more contexts.
Bug: 178099697
Test: m test-art-host-gtest
Change-Id: I26a4fe326371686d5857ad49ba98569f5c55f84a
12 files changed