Fixed #22667 -- Replaced leader/follower terminology with primary/replica
Fixed #20816 -- Added hints about Django middleware ordering

Thanks gthb Trac user for the report, kolypto StackOverflow
user for the initial list and Tim Graham for the review.
Fixed #21598 -- cleaned up template loader overrides in tests

- Template loader overriding is managed with contexts.
- The test loader is a class (function based loaders entered deprecation timeline
  in 1.4).
- Template loader overrider that overrides with test loader added.
Fixed #21357 -- Fixed test client session initialization.

The test client will now create a session when it is first accessed
if no session already exists.
Fixed #22602 -- Improved code coverage of makemigrations command tests.
Fixed tuple serialization test.

Thanks to rockallite for the report.
Made runtests.py use 'set_installed_apps' API

This will also trigger the ready method of any tested application,
which was not run before.
Applied unicode_literals to makemessages command

This also fixes #22686 as some sort of side-effect.
Moved some imports in runtests.py
Fixed #22510 -- Harden field removal to only None.

Refs #8620.

If we allow any value to remove form fields then we get name clashes
with method names, media classes etc. There was a backwards
incompatibility introduced meaning ModelForm subclasses with declared
fields called media or clean would lose those fields.

Field removal is now only permitted by using the sentinel value None.
The docs have been slightly reworded to refer to removal of fields
rather than shadowing.

Thanks to gcbirzan for the report and initial patch, and several of the
core team for opinions.
Fixed #22676 -- makemigrations --dry-run should not ask for defaults

Made the fix in InteractiveMigrationQuestioner class code, rather than
MigrationAutodetector, because --dry-run shouldn't affect whether
MigrationAutodetector will detect non-nullable fields, but the
questioner should skip the question and returns a None for default
(since that won't be used anyway) if --dry-run is used.
Fixed #22688 -- Documented ready() may be called more than once
Removed GeoWhereNode, obsoleted by GISLookup
Removed comment forgotten in 3caf957ed5
Removed code deprecated from Django 1.2
Fixed a few ResourceWarning in the test suite. Refs #22680.
Fixed a ResourceWarning that wasn't properly fixed by the previous commit.

Also removed unused import in runtests.py.
Fixed a few warnings in the testsuite.
Removed executeable bit from a few files.
Restored Python 2 compatibility.