Provide method to dump backtrace heap data.

For non-zygote spawned processes, we might want to dump the backtrace
data. Provide a method to send a signal to a process and then dump the
data to a file.

Adds a method to dump the backtrace data on exit.

Update documentation and explain format of heap dump data.

Test: Ran unit tests, enabled new options and used them.
Change-Id: Ie2fa706694160731afe02c1382b037d06df1d069
diff --git a/libc/malloc_debug/malloc_debug.h b/libc/malloc_debug/malloc_debug.h
index 347fae2..4a1e8da 100644
--- a/libc/malloc_debug/malloc_debug.h
+++ b/libc/malloc_debug/malloc_debug.h
@@ -54,7 +54,8 @@
   size_t size;
   size_t usable_size;
   size_t real_size() const { return size & ~(1U << 31); }
-  void set_zygote() { size |= 1U << 31; }
+  void set_zygote_child_alloc() { size |= 1U << 31; }
+  bool zygote_child_alloc() const { return size & (1U << 31); }
   static size_t max_size() { return (1U << 31) - 1; }
 } __attribute__((packed));