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.cc b/aos/events/logging/log_namer.cc
index 8ec1e70..9ca1274 100644
--- a/aos/events/logging/log_namer.cc
+++ b/aos/events/logging/log_namer.cc
@@ -714,9 +714,13 @@
   return data_writer_.get();
 }
 
-void MultiNodeLogNamer::Close() {
+WriteCode MultiNodeLogNamer::Close() {
   data_writers_.clear();
   data_writer_.reset();
+  if (ran_out_of_space_) {
+    return WriteCode::kOutOfSpace;
+  }
+  return WriteCode::kOk;
 }
 
 void MultiNodeLogNamer::ResetStatistics() {