Actually manage memory in the old-style AOS logging

LeakSanitizer should be happy with it now. It's also still just as
thread-safe.

Change-Id: Id09a0349657cf4f719267b053f0ea3d8ec366256
diff --git a/aos/logging/BUILD b/aos/logging/BUILD
index a499d68..6686a3c 100644
--- a/aos/logging/BUILD
+++ b/aos/logging/BUILD
@@ -5,20 +5,28 @@
     name = "logging",
     srcs = [
         "context.cc",
+        "implementations.cc",
         "interface.cc",
     ],
     hdrs = [
         "context.h",
+        "implementations.h",
         "interface.h",
         "logging.h",
     ],
     visibility = ["//visibility:public"],
     deps = [
+        ":printf_formats",
         ":sizes",
         "//aos:complex_thread_local",
         "//aos:die",
         "//aos:macros",
         "//aos/libc:aos_strerror",
+        "//aos/mutex",
+        "//aos/stl_mutex",
+        "//aos/time",
+        "//aos/type_traits",
+        "@com_google_absl//absl/base",
     ],
 )
 
@@ -66,26 +74,9 @@
 
 cc_library(
     name = "implementations",
-    srcs = [
-        "implementations.cc",
-    ],
-    hdrs = [
-        "implementations.h",
-    ],
-    linkopts = [
-        "-lpthread",
-    ],
     visibility = ["//visibility:public"],
     deps = [
         ":logging",
-        ":printf_formats",
-        ":sizes",
-        "//aos:die",
-        "//aos:macros",
-        "//aos/mutex",
-        "//aos/time",
-        "//aos/type_traits",
-        "@com_google_absl//absl/base",
     ],
 )