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.cc b/aos/logging/context.cc
index 446e0df..0628e0e 100644
--- a/aos/logging/context.cc
+++ b/aos/logging/context.cc
@@ -42,7 +42,7 @@
 
   char thread_name_array[kThreadNameLength + 1];
   if (prctl(PR_GET_NAME, thread_name_array) != 0) {
-    PDie("prctl(PR_GET_NAME, %p) failed", thread_name_array);
+    PLOG(FATAL) << "prctl(PR_GET_NAME, " << thread_name_array << ") failed";
   }
 #if __has_feature(memory_sanitizer)
   // msan doesn't understand PR_GET_NAME, so help it along.
@@ -73,7 +73,7 @@
 
 }  // namespace
 
-Context::Context() : implementation(GetImplementation()), sequence(0) {}
+Context::Context() : sequence(0) {}
 
 // Used in aos/linux_code/init.cc when a thread's name is changed.
 void ReloadThreadName() {