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
The first is arguably YAGNI;  the second discounts the costs (the code below is much harder to understand than the equivalent without the weights (e.g., `if match in self.json_types:`).