[1.7.x] Fixed #22813 -- Updated Pillow URL in documentation

Backport of dfa3505ff1 from master.
[1.7.x] Fixed #22818 -- Clarified you need to cd into the Django clone.

Thanks Josh Parris.

Backport of bcc3d2b978 from master
[1.7.x] Fixed test failures due to refs #20420.

cfcca7ccce3dc527d16757ff6dc978e50c4a2e61 renamed connection.queries
to queries_log and this wasn't backported to stable/1.7.x.
[1.7.x] Fixed #22823 (and partly #22563) - FKs from unmigrated apps breaking state.

Thanks to bendavis78 for the test and diagnostic work.
[1.7.x] Fixed #22811 -- Allowed setting both the old and new TEST database settings.

An ImproperlyConfigured exception will be raised they mismatch.

Backport of 1c58cabad7 and a2cd0e12c9 from master
[1.7.x] Fixed a staticfiles test on Windows.

Backport of 9980f67154 from master
[1.7.x] Fix test breakage from previous state fix
[1.7.x] Made the vendored NamedTemporaryFile work as a context manager. Refs #22680.

This fixes a regression on Windows introduced by b7de5f5.

Thanks Tim Graham for the report and review.

Backport of 6e8d614acd from master
[1.7.x] Fixed #22349 -- Added a note clarifying `RawQuerySet` has no `__len__`.

Thanks cdestigter for the report.

Backport of 2d425116e2 from master