remove unused code in Utils class + simplify code
Refacor Json class:
* don't repeat Json in class methods so Json::outputJson() and Json::fetchJson become Json::output() and Json::fetch()
* slight code clean up
* add missing tests for output()
* add a $pretty_print variable to output() for debugging