Enable the computation and testing of GC metrics in ART's CMC collector.

These metrics were previously only enabled in ART's Concurrent Copying
(CC) collector; also enable them in the Concurrent Mark-Compact (CMC)
collector.

Amend test `HeapTest.GCMetrics` (in ART gtest `art_runtime_tests`) to
reflect this new behavior of ART's CMC collector.

(cherry picked from commit 68643f562e6e8faf0408a123a937041e4ea3cc2f)

Test: ART_USE_READ_BARRIER=true ART_USE_GENERATIONAL_CC=true \
        m test-art-host-gtest-art_runtime_tests
Test: ART_USE_READ_BARRIER=true ART_USE_GENERATIONAL_CC=false \
        m test-art-host-gtest-art_runtime_tests
Test: ART_USE_READ_BARRIER=false \
        m test-art-host-gtest-art_runtime_tests
Bug: 270391874
Bug: 270957146
Change-Id: Idb23c3ef145549e69fc8e97a4fe977ba71f61873
Merged-In: Idb23c3ef145549e69fc8e97a4fe977ba71f61873
2 files changed