Clean up internal libc logging.

We only need one logging API, and I prefer the one that does no
allocation and is thus safe to use in any context.

Also use O_CLOEXEC when opening the /dev/log files.

Move everything logging-related into one header file.

Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58
diff --git a/libc/bionic/dlmalloc.c b/libc/bionic/dlmalloc.c
index 1ed3205..7d4ef0f 100644
--- a/libc/bionic/dlmalloc.c
+++ b/libc/bionic/dlmalloc.c
@@ -24,8 +24,7 @@
 
 #include <linux/ashmem.h>
 
-#include <private/debug_format.h>
-#include <private/logd.h>
+#include <private/libc_logging.h>
 
 // Send dlmalloc errors to the log.
 static void __bionic_heap_corruption_error(const char* function);