Remove four counter increments out of the allocation path.

- This change removes the four allocation counters (the number of
bytes allocated, the number of objects allocated, the number of bytes
allocated ever, the number of objects allocated ever) from the
dlmalloc space allocation path. Now those counter values are computed
on the fly based on a combination of the two new counters that are
incremented by the GC side (the number of bytes freed ever and the
number of objects freed ever) and mspace_inspect_all() calls.

- This results in a 1-2% speedup (though with some noise) in Ritz
MemAllocTest on Nexus 4.

Bug: 9986565
Change-Id: Id9a8e05a745ac1e5ea7a2b5fd9319814a9d4af13
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index 68df563..6dd7952 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -146,13 +146,13 @@
 class AllocSpace {
  public:
   // Number of bytes currently allocated.
-  virtual uint64_t GetBytesAllocated() const = 0;
+  virtual uint64_t GetBytesAllocated() = 0;
   // Number of objects currently allocated.
-  virtual uint64_t GetObjectsAllocated() const = 0;
+  virtual uint64_t GetObjectsAllocated() = 0;
   // Number of bytes allocated since the space was created.
-  virtual uint64_t GetTotalBytesAllocated() const = 0;
+  virtual uint64_t GetTotalBytesAllocated() = 0;
   // Number of objects allocated since the space was created.
-  virtual uint64_t GetTotalObjectsAllocated() const = 0;
+  virtual uint64_t GetTotalObjectsAllocated() = 0;
 
   // Allocate num_bytes without allowing growth. If the allocation
   // succeeds, the output parameter bytes_allocated will be set to the