Fixed #22017 -- Prevented RuntimeError on Python 3

Refs #21049. Thanks quinox for the report.
Fixed #22025 -- Listing app followed by app.Model in dumpdata command

When invoked as follows:

  $ python manage.py dumpdata blogapp blogapp.Tag

Django would throw a TypeError. This commit fixes the problem and provides
a test.
Reworked the detection of local storages for the collectstatic command.

Before 4befb30 the detection was broken because we used isinstance
against a LazyObject rather than against a Storage class. That commit
fixed it by looking directly at the object wrapped by LazyObject.
This could however be a problem to anyone who subclasses the
collectstatic management Command and directly supplies a Storage class.

Refs #21581.
Add --empty option to makemigrations
Remove redunant code from RunPython operation
Fix my slightly hasty autodetector changes
Add reference documentation for operations and stubs for schemaeditor.
Reverting unapplied migrations check away from being a system-level check.

This reverts commit 0ac13eccebb3d879f79b31585b1e81f655067179.
Fixed #21856: Don't crash runserver when DATABASES = {}
Removed test for migration check forgotten in 7e941ba67ceab8a74ba50509d13ed4298f8305cd.
Fixed #21951 -- Updated docs to use __str__ for Python 3

Thanks Tim Graham for the report and recommendations
Fixed #21064 -- Refactored common logic in ModelAdmin.add_view and change_view.
Fixed #19496 -- Added truncatechars_html filter.

Thanks esevece for the suggestion and  Nick Sandford and Martin Warne
for the inital work on the patch.
Fixed a link in the 1.7 release notes.
Fixed a typo (I guess).
Fixed #22030 -- Don't assume that all fields have a swappable_setting attribute.
Removed _actions_icnt declaration from local scope in admin JS.

Commit 4523fcd introduces _actions_icnt to the local scope,
which overrides the value set in the HTML.

The admin would incorrectly show selected rows in a change list
as "1 of undefined selected".
Updated docs that misreported django.apps.apps.ready as being a method.
Fixed #21654 -- Documented a use-case for Form.errors.as_data().

Thanks selwin for the suggestion.
Added missing snippet to show filename in docs