Read/write binaryproto in recipe helper programs

This change adds new new input and output binaryproto path flags. When
specified, the input flag causes input to be read from binaryproto
rather than jsonpb. When specified, the output flag causes output to be
written to a binaryproto output file.

The approach here will let us migrate the recipes safely from the old
jsonpb way to the new binaryproto way.

BUG=chromium:1030000
TEST=local runs

Change-Id: I21dbf5bb717929f6e05b50c234024bd229c370fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/go/+/1947168
Reviewed-by: Dhanya Ganesh <dhanyaganesh@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
Tested-by: Sean Abraham <seanabraham@chromium.org>
3 files changed