Add a log_allocator_stats_on_exit option.

Running some types of executables, you want to get the stats at
the end of the run. Therefore, add an option to dump the allocator
stats when the program finishes.

Add new unit tests to cover this new option.

Test: All unit tests pass.
Test: Enabled the option, ran getprop and verified that the
Test: log contains the allocator stats.
Change-Id: I1c9f7d5a1fe374e8cfb6ffc8d1caa59064c5d55e
diff --git a/libc/malloc_debug/Config.h b/libc/malloc_debug/Config.h
index 8551712..4840d43 100644
--- a/libc/malloc_debug/Config.h
+++ b/libc/malloc_debug/Config.h
@@ -49,6 +49,7 @@
 constexpr uint64_t CHECK_UNREACHABLE_ON_SIGNAL = 0x2000;
 constexpr uint64_t BACKTRACE_SPECIFIC_SIZES = 0x4000;
 constexpr uint64_t LOG_ALLOCATOR_STATS_ON_SIGNAL = 0x8000;
+constexpr uint64_t LOG_ALLOCATOR_STATS_ON_EXIT = 0x10000;
 
 // In order to guarantee posix compliance, set the minimum alignment
 // to 8 bytes for 32 bit systems and 16 bytes for 64 bit systems.