Close previous logger first when restarting

The LZMA compressor is a massive memory user, and having both open at
once significantly increases peak memory usage, which is all that
matters since the OS doesn't reliably reclaim memory from the logger.

Digging in further, we have very few to no mallocs right now in a
lzma logger when it is up and running.  The increasing memory
usage comes from the kernel paging memory in behind the heap when it
gets accessed the first time, and the high peak memory needed by
rotating.

If this isn't enough, we should be able to figure out how to make a pool
for the lzma compressor so it doesn't re-allocate.

Change-Id: Ife2d6a1d51b279aadd99825ce2018d608493d360
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/events/logging/log_namer.h b/aos/events/logging/log_namer.h
index 3b54025..84745b6 100644
--- a/aos/events/logging/log_namer.h
+++ b/aos/events/logging/log_namer.h
@@ -216,6 +216,10 @@
   // Returns all the nodes that data is being written for.
   const std::vector<const Node *> &nodes() const { return nodes_; }
 
+  // Closes all existing log data writers. No more data may be written after
+  // this.
+  virtual WriteCode Close() = 0;
+
   // Returns the node the logger is running on.
   const Node *node() const { return node_; }
   const UUID &logger_node_boot_uuid() const { return logger_node_boot_uuid_; }
@@ -387,7 +391,7 @@
   // Closes all existing log files. No more data may be written after this.
   //
   // This may set ran_out_of_space().
-  void Close();
+  WriteCode Close() override;
 
   // Accessors for various statistics. See the identically-named methods in
   // DetachedBufferWriter for documentation. These are aggregated across all