Fixed #20636 -- Stopped stuffing values in the settings.

In Django < 1.6, override_settings restores the settings module that was
active when the override_settings call was executed, not when it was
run. This can make a difference when override_settings is applied to a
class, since it's executed when the module is imported, not when the
test case is run.

In addition, if the settings module for tests is stored alongside the
tests themselves, importing the settings module can trigger an import
of the tests. Since the settings module isn't fully imported yet,
class-level override_settings statements may store a reference to an
incorrect settings module. Eventually this will result in a crash during
test teardown because the settings module restored by override_settings
won't the one that was active during test setup.

While Django should prevent this situation in the future by failing
loudly in such dubious import sequences, that change won't be backported
to 1.5 and 1.4. However, these versions received the "allowed hosts"
patch and they're prone to "AttributeError: 'Settings' object has no
attribute '_original_allowed_hosts'". To mitigate this regression, this
commits stuffs _original_allowed_hosts on a random module instead of the
settings module.

This problem shouldn't occur in Django 1.6, see #20290, but this patch
will be forward-ported for extra safety.

Also tweaked backup variable names for consistency.

Forward port of 0261922 from stable/1.5.x.

Conflicts:
	django/test/utils.py
Fixed #20653 -- Renamed checksetup management command.

This is to allow future compatibility with work that is ongoing in the 2013 GSoC.
Fixed #20654 -- Fixed type of `m2m_changed`'s `pk_set` arg in docs
Doc cleanup for FormMixin.prefix; refs #18872.
Fixed #19773 - Added admin/popup_response.html template.

Thanks jimmylam@ for the suggestion.
Fixed #20642 -- Deprecated `Option.get_(add|change|delete)_permission`.

Those methods were only used by `contrib.admin` internally and exclusively
related to `contrib.auth`. Since they were undocumented but used
in the wild the raised deprecation warning point to an also undocumented
alternative that lives in `contrib.auth`.

Also did some PEP8 and other cleanups in the affected modules.
Fixed #20650 -- Fixed {% filter %} incorrectly accepting 'escape' as argument

Thanks to grzesiof for the report and to loic84 and Alex Gaynor
for the review.
Fixed #20658 -- Fixed bad reST formatting and missing parentheses in the docs for CBV mixins

Thanks to Keryn Knight for the report.
Fixed #20462 -- null/non-string regex lookups are now consistent

Thanks to noirbizarre for the report and initial patch.
Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text()
Merge pull request #1308 from loic/ticket20462

Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text()
Fixed #14881 -- Modified password reset to work with a non-integer UserModel.pk.

uid is now base64 encoded in password reset URLs/views. A backwards compatible
password_reset_confirm view/URL will allow password reset links generated before
this change to continue to work. This view will be removed in Django 1.7.

Thanks jonash for the initial patch and claudep for the review.
Add missing preposition in documentation
Merge pull request #1309 from treyhunner/patch-1

Add missing preposition in documentation.
Merge remote-tracking branch 'upstream/master'