riemann-client: Add support for JSON formatted output

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
riemann-client: Code cleanup

Moved the query dumper code into their own functions, and instead of
setting a flag when --json is passed, set a dumper function instead.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge branch 'f/riemann-client/json-output'