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/events/aos_logging.h b/aos/events/aos_logging.h
index b50569c..e99edb7 100644
--- a/aos/events/aos_logging.h
+++ b/aos/events/aos_logging.h
@@ -11,13 +11,14 @@
  public:
   AosLogToFbs() {}
 
-  // TODO(Tyler): Deregister logger on destruction to avoid memory leaks
-
   void Initialize(Sender<logging::LogMessageFbs> log_sender);
+  std::shared_ptr<logging::LogImplementation> implementation() const {
+    return implementation_;
+  }
 
  private:
   Sender<logging::LogMessageFbs> log_sender_;
-  logging::ScopedLogRestorer prev_logger_;
+  std::shared_ptr<logging::LogImplementation> implementation_;
 };
 
 }  // namespace aos