cleaned up lots of not-so-niceties and a few bugs

I built everything with clang (hackishly in some areas) and it spit out a bunch
of warnings.
diff --git a/aos/common/queue.h b/aos/common/queue.h
index 927f11f..33dc377 100644
--- a/aos/common/queue.h
+++ b/aos/common/queue.h
@@ -18,7 +18,7 @@
 
 namespace aos {
 
-class MessageType;
+struct MessageType;
 
 // This class is a base class for all messages sent over queues.
 // All of the methods are overloaded in (generated) subclasses to do the same