Properly closed cache connections at the end of the request.

This only affects the new cache api and not the deprecated get_cache.

Refs #21012
Fixed #21500 -- Removed imports of deprecated utils.importlib
Added more tests for ContentTypeManager.get_for_model.
Fixed #21497 -- Forced conversion to bytes for very long index names
Removed confusing comments from the docs.

The settings reference documentation doesn't seem the right place to
invite users to write their own db and cache backends.

Also the actual wording makes the task sound trivial, which is hardly
the case; writing a custom db backend is a very difficult task, and
writing a custom cache backend is full of gotcha.
Fixed #21490 -- Fixed custom admin URL reverse example.

Thanks glarrain for the report.
Fixed typo in previous commit; refs #21490.
Fixed #21391 -- Allow model signals to lazily reference their senders.
Fixed some unnescesarily gendered language in the docs
flake8 fixes
Fixed test failure on Oracle

Failure was introduced with test in [19e5cd77f0536b778b00788e34d8199835143855]
Fixed #21507 -- Corrected default widget information for FileField
Fixed #21403: Corrected test code

A test for annotations incorrectly assumed that the first instance
(in the test) of a model using AutoField for PK will always get pk=1.
The test was changed to compare against actual instance id instead.
flake8 fix
Fixed #21509 -- Removed dead exception catching code.

Since Python 2.5, KeyboardInterrupt and SystemExit are not subclasses of
Exception, so explicitly reraising them before the “except Exception” clause
is not necessary anymore.
Fixed #21489 -- Make formsets directly importable from django.forms.
Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.

Updated ModelAdmin to use form.instance when passing parent model to
child inlines for add_view. There is effectively no change in the
change_view since the previously passed 'obj' is the same as form.instance.

Thanks to meshy for report, and EvilDMP and timo for review.
Fixed #21512 -- Added more complete information about Pillow and PIL in model_fields and model_forms tests.
Use str.isupper() to test if a string is uppercased.
Fixed #21355 -- try importing _imaging from PIL namespace first.