Make AOS logging per thread, not global

We noticed that if 2 threads use AOS_LOG, they occasionally crash.  The
stack trace looked like 2 messages were being constructed
simultaneously.  Digging in, this is possible because there is 1 global
logger which gets passed (patchily) to the per-thread context.

We've got a bunch of different cases and (reasonable) ways to handle
them when ShmEventLoop comes into play.

Simple single threaded appliction:
  * Outside Run() -> stderr
  * Inside Run() -> /aos

Single event loop appliction with extra threads
  * Outside Run() -> stderr
  * Inside Run() -> /aos
  * Other threads -> stderr

Multiple event loop appliction with extra threads
  * Outside Run() -> stderr
  * Inside Run() -> /aos
  * Other threads -> stderr

Simulation:
  * Inside Run -> /aos
  * Outside Run -> stderr

This pretty quickly quickly looks like a thread local logging handler
and a fallback to stderr.  We don't really need much more, and don't
want to worry about synchronization for much more, so lets just do the
simple thing for now and revise if there are better use cases.

Change-Id: I90d76516a55f0b01a8a0e27ad0434dac5921e261
diff --git a/aos/logging/context.h b/aos/logging/context.h
index 43ac54f..cc770ba 100644
--- a/aos/logging/context.h
+++ b/aos/logging/context.h
@@ -45,7 +45,8 @@
   static void DeleteNow();
 
   // Which one to log to right now.
-  // Will be NULL if there is no logging implementation to use right now.
+  // Will be NULL if there is no logging implementation to use right now and we
+  // should use stderr instead.
   std::shared_ptr<LogImplementation> implementation;
 
   // A name representing this task/(process and thread).