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`.