Add a DropboxWriter in statsd.

+ The DropboxWriter keeps data in cache, and flush to files once the
  size exceeds the maximum value.

+ Different components should create their owner DropboxWriter with
  different tags, e.g., anomly detection, experiment metrics, etc.

+ Copied stats_log related protos from g3

Test: run statsd, and adb shell dumpsys dropbox
      Will add unit tests.

Change-Id: If06e9a9953be32082252b340a97124d732656b40
diff --git a/cmds/statsd/src/main.cpp b/cmds/statsd/src/main.cpp
index 93405cb..2c721c7 100644
--- a/cmds/statsd/src/main.cpp
+++ b/cmds/statsd/src/main.cpp
@@ -19,6 +19,7 @@
 #include "LogEntryPrinter.h"
 #include "LogReader.h"
 #include "StatsService.h"
+#include "StatsLogProcessor.h"
 
 #include <binder/IInterface.h>
 #include <binder/IPCThreadState.h>
@@ -55,9 +56,8 @@
     sp<LogReader> reader = new LogReader();
 
     // Put the printer one first, so it will print before the real ones.
-    if (true) {
-        reader->AddListener(new LogEntryPrinter(STDOUT_FILENO));
-    }
+    reader->AddListener(new LogEntryPrinter(STDOUT_FILENO));
+    reader->AddListener(new StatsLogProcessor());
 
     // TODO: Construct and add real LogListners here.