fixed lots of not-thread-safe things

Most of the things I fixed here were using libc functions that are
fundamentally not thread-safe.
diff --git a/aos/common/die.h b/aos/common/die.h
index 05500be..80e8450 100644
--- a/aos/common/die.h
+++ b/aos/common/die.h
@@ -4,7 +4,7 @@
 #include <stdarg.h>
 
 #include "aos/common/macros.h"
-#include "aos/common/util/aos_strerror.h"
+#include "aos/common/libc/aos_strerror.h"
 
 namespace aos {