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.
Fixed typo in docs/ref/models/custom-lookups.txt.
Fixed too short title underline in docs.
Fixed #22692 -- Added docs for `makemigrations` two command options.

Added documentation about `--dry-run` and `--merge`.
Fix an error in a documented lookup example.
Fixed #22675 -- makemigrations --dry-run to output migrations to stdout.

`makemigrations --dry-run` will output the complete migrations file
that would be written if it's used along with `--verbosity 3`.
Fixed #22699 -- Configure default settings in some management commands.

This makes it possible to run django.setup() in management commands that
don't need a settings module. In addition it simplifies error handling.

Thanks Claude for the review.
Fixed #21630 -- Simplified management command discovery

Thanks Aymeric Augustin for the report end the review.
Removed an old compatibility shim added in 1.0
Fix a regression introduced by f011b90363.

`django.get_version` was actually used by the module.
Argument to `reversed` must be a sequence on Py3.
Fixed #22601 -- Added a note about model inheritance.

Thanks semenov for the report.
Fixed spelling in docs.
Fixed #22714 -- Made contrib.gis use six-provided memoryview type

Thanks Tim Graham for the report.
Fixed #22715: Corrected sql for defaults of BinaryField on Oracle with Python3

While at it, fixed a problem in returning empty values
(still with BinaryField/Oracle/Python3).