Report Post-GC memory metrics

Bug: 331243037
Flag: android.app.report_postgc_memory_metrics

This makes use of ProcfsMemoryUtil.java, and so part of the change is to
move ProcfsMemoryUtil to com.android.internal.os so it can be shared.

This also registers the callback to report memory metrics in VMRuntime
when a post-GC event happens.

Change-Id: Idbe67f306935fefa8f3e4b4ef4fe656a61a4ede6
6 files changed