added content-type headers to json responses

replaced instances of dumps() for preferred cherrypy.tools.json_out9)
which also sets content-type headers, in addition to jsonifying data