Refactor dumping to not be tied to bookkeeping.

This makes the code easier to understand, now the hybrid struct / class
DumpState is made into a proper class, and the flow of data is clear
from the code

This will make the dumping changes for idle page tracking easier.

Change-Id: Ib468d4eab036516f04fcec20ff861df009e30032
diff --git a/Android.bp b/Android.bp
index 05add93..6ad051b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -76,6 +76,7 @@
     "src/ipc/service_proxy.cc",
     "src/ipc/virtual_destructors.cc",
     "src/profiling/memory/bookkeeping.cc",
+    "src/profiling/memory/bookkeeping_dump.cc",
     "src/profiling/memory/heapprofd_producer.cc",
     "src/profiling/memory/main.cc",
     "src/profiling/memory/proc_utils.cc",
@@ -612,6 +613,7 @@
     "src/ipc/service_proxy.cc",
     "src/ipc/virtual_destructors.cc",
     "src/profiling/memory/bookkeeping.cc",
+    "src/profiling/memory/bookkeeping_dump.cc",
     "src/profiling/memory/client.cc",
     "src/profiling/memory/heapprofd_end_to_end_test.cc",
     "src/profiling/memory/heapprofd_producer.cc",
@@ -2943,6 +2945,7 @@
     "src/perfetto_cmd/rate_limiter_unittest.cc",
     "src/perfetto_cmd/trigger_producer.cc",
     "src/profiling/memory/bookkeeping.cc",
+    "src/profiling/memory/bookkeeping_dump.cc",
     "src/profiling/memory/bookkeeping_unittest.cc",
     "src/profiling/memory/client.cc",
     "src/profiling/memory/client_unittest.cc",