Pretty print json and xml in debug mode

For json, use the built in JSON_PRETTY_PRINT constant, if available
(PHP 5.4.0 or later)
Merge pull request #54 from jippi/feature/json-pretty-print-debug

RFC: Pretty print json and xml in debug mode