renamed views to handlers, that's the lingo of webapp2
moved building of data JSON into model and made sure valid JSON is returned on empty content
moved increment operation for Domain data into model
removed code duplication by introducing Django-like function get_domain_or_404