Add --output-format command line option

Right now we have normal, terse, and json output. Lets add a parameter
that controls how to output results, instead of having options for
both terse and json outputs. If we are going to add a 4th output
type in the future, it's only going to get more messy.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/json.c b/json.c
index 707ea14..8efbbda 100644
--- a/json.c
+++ b/json.c
@@ -96,9 +96,9 @@
 	return value;
 }
 
-static void json_free_array(struct json_array *array);
 static void json_free_pair(struct json_pair *pair);
 static void json_free_value(struct json_value *value);
+
 void json_free_object(struct json_object *obj)
 {
 	int i;