Add new mallopt M_LOG_STATS.

This new mallopt cause statistics of the allocator to be printed in
the log.

Add a stats print for jemalloc.

This is designed to be used as part of a dumpsys meminfo --XXXX
option so that it's easier to get information about apps that
have an unusual memory footprint.

Test: Unit tests pass.
Test: Ran on a device using jemalloc and verified log data.
Test: Ran on a device using scudo and verified log data.
Change-Id: I6fa44ce619c064b2596fbbb478c231994af94f4c
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index 91d63b3..4158c6e 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -320,6 +320,16 @@
 };
 
 /**
+ * mallopt() option to print human readable statistics about the memory
+ * allocator to the log. There is no format for this data, each allocator
+ * can use a different format, and the data that is printed can
+ * change at any time. This is expected to be used as a debugging aid.
+ *
+ * Available since API level 35.
+ */
+#define M_LOG_STATS (-205)
+
+/**
  * [mallopt(3)](http://man7.org/linux/man-pages/man3/mallopt.3.html) modifies
  * heap behavior. Values of `__option` are the `M_` constants from this header.
  *