[1.7.x] Avoided using private API get_template_from_string.

Conflicts:
	django/contrib/webdesign/tests.py

Backport of c0c1bb9e from master.
[1.7.x] Fixed #23738 -- Allowed migrating from NULL to NOT NULL with the same default value

Thanks to Andrey Antukh for the report.

Backport of 715ccfde24 from master
[1.7.x] Added a warning about direct settings manipulation in tests.

Thanks Thomas Chaumeny for the initial patch.

Backport of 3f651b3e88 from master
[1.7.x] Fixed #23732 -- Corrected and enhanced select_related() docs.

Thanks Daniele Procida for the report and review.

Backport of e958c760f9 from master
[1.7.x] Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on PostGIS.

Thanks raratiru for the report and Claude Paroz for review.

Backport of d6d55368d4 from master