Support gsql output in JSON format

I've talked to at least a few teams that are directly querying
the database over gsql and scraping its output.  To mirror our
gerrit stream-events output gsql can now produce its records as
JSON objects, making them more suitable for machine consumption.

Change-Id: Ib2812b60a5d77824a48d511c50f6d8c2b23c4190
Signed-off-by: Shawn O. Pearce <sop@google.com>
4 files changed