move to json for app status

This resolves the HTML templating issues pointed out by @esc while
remaining readable, without requiring jinja2.
setting the application/json content type

This makes the page more readable in a browser and is also much more
correct than the default text/html.