Exceptions with Accept-Type application/json will return JSON type error.

* had to implement the server_quality because of failing tests. text/html is preferred. (test test__default_app_iter_with_comment_html)
* because of the server_quality I had to check if the match was in the range of html_types or json_types (using the tuple)
* the json is returning immediately, because no use of "templated" arguments and adding comments is invalid to json spec
* the check for accept at html_types is because of compatibility (with tests), when no accept exists, plain will be default.
* moved the import json to above the pyramid imports
* some fixes becaus of python3 compatibility
Given that the quality is always 1, you can simplify both lists to just lists of strings.