Fixed documentation of disable_constraint_checking

The docstring and base implementation of disable_constraint_checking do not indicate that a return value is expected for proper behavior.
Fix NoneType error when fetching a stale ContentType with get_for_id

When a stale ContentType is fetched, the _add_to_cache() function
didn't detect that `model_class()` returns `None` (which it does by
design). However, the `app_label` + `model` fields can be used instead
to as local cache key. Third party apps can detect stale models by
checking whether `model_class()` returns `None`.

Ticket: https://code.djangoproject.com/ticket/20442
Fixed #12747 -- Made reason phrases customizable.
Merge pull request #1028 from manfre/patch-2

Fixed #20340 - document required return value for disable_constraint_checking
Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware
Merge pull request #1138 from ambv/issue20126

Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware
Fixed #11442 -- Postgresql backend casts all inet types to text
Add missing imports and models to the examples in the template layer documentation
Add missing imports and models to the examples in security documentation
Add missing imports and models to the examples in internationalization and localization documentation
add missing imports to the examples in the 'Forms'
Add missing imports and models to the examples in the admin documentation
Fix #19070 -- Additional test for urlize and brackets
Merge pull request #1160 from erikr/host-inet-postgres2

Fixed #11442 -- Postgresql backend casts all inet types to text
Merge pull request #1161 from erikr/urlize-additional-test

Fixed #19070 -- Additional test for urlize and brackets
Fixes #18896. Add tests verifying that you can get IntegrityErrors using get_or_create through relations like M2M, and it also adds a note into the documentation warning about it
Merge pull request #1164 from pyriku/get_or_create_through_m2m

Integrity problems when using get_or_create through M2M
Merge pull request #1162 from sspross/patch-docs

Add needed Imports to the Documentation, Part II
Merge pull request #1130 from vdboor/issue_20442_get_for_id

Fixed #20442: NoneType error when fetching a stale ContentType with get_for_id
Fix #20447: URL names given to contrib.auth.views are now resolved.

This commit also adds tests for the redirect feature of most auth views.
It also cleans up the tests, most notably using @override_settings instead
of ad-hoc setUp/tearDown methods.

Thanks to caumons for the report.

Conflicts:
	docs/releases/1.6.txt