Some refactoring and improvements in models:
 * Added custom managers for natural key support, and moved `Module` classmethods to manager instance methods.
 * Use `json` instead of `simplejson`, and moved `views/json.py` to `views/utils.py` to prevent namespace clash
 * `error_response` is v1 only, so moved into v1 views
 * Use non-deprecated Django/Python APIs
Fix tests, and make existing ones specific to v1 API.