Replace JSON.pretty_generate with Yajl::Encoder

Attempts to capture CC diagnostics on recent releases was generating an
empty file because pretty_generate was failing in an odd way.  Moving to
yajl resolves the issue.

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>