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
3 files changed