Redirect output to file ASAP, otherwise printf() calls might be missed.

Also removed the duraction reporter on add_zip_entry_from_fd -  since it
was spamming the report and the timing could be infered by calculating the
delta between each ALOGD entry anyways - and logged PID and statistics.

BUG: 26885492
Change-Id: Iadb00957daac68b7a40b0e36ee5cce2b82264588
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 0a9f9e2..8332d22 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -165,6 +165,7 @@
 class DurationReporter {
 public:
     DurationReporter(const char *title);
+    DurationReporter(const char *title, FILE* out);
 
     ~DurationReporter();
 
@@ -172,6 +173,7 @@
 
 private:
     const char* title_;
+    FILE* out_;
     uint64_t started_;
 };