Fix several nits

1. Change the APIs of ProtoOutputStream to be able to write bytes
2. Fix the tests in incidentd, stdout is closed so can't capture the
value, use temporaryFile instead.

Test: N/A
Change-Id: Ibc31f2efd068afc6c06188d92f57ca5a754c3683
diff --git a/libs/protoutil/include/android/util/ProtoOutputStream.h b/libs/protoutil/include/android/util/ProtoOutputStream.h
index 0f1cced..10be649 100644
--- a/libs/protoutil/include/android/util/ProtoOutputStream.h
+++ b/libs/protoutil/include/android/util/ProtoOutputStream.h
@@ -49,7 +49,7 @@
     bool write(uint64_t fieldId, long long val);
     bool write(uint64_t fieldId, bool val);
     bool write(uint64_t fieldId, std::string val);
-    bool write(uint64_t fieldId, const char* val);
+    bool write(uint64_t fieldId, const char* val, size_t size);
 
     /**
      * Starts a sub-message write session.
@@ -103,4 +103,4 @@
 }
 }
 
-#endif // ANDROID_UTIL_PROTOOUTPUT_STREAM_H
\ No newline at end of file
+#endif // ANDROID_UTIL_PROTOOUTPUT_STREAM_H