[1.7.x] Fixed #22412 -- More nuanced advice re template filters and exceptions.

Thanks Tim for review.

Backport of 7e3834adc9 from master
[1.7.x] Fixed #22195 -- Used constants to define built-in tags for check framework.

Thanks Elvard for the patch.

Backport of b513fa5fc6 from master
[1.7.x] Fixed #22194 -- Added --list-tags option to check command.

Thanks Elvard for the patch.

Backport of 395d75ea6b from master
[1.7.x] Fixed #22364 -- Sanitized getpass input in changepassword.

Python 2 getpass on Windows does not accept unicode, even
when containing on ASCII characters. Related #190807.

Backport of b5a9166f7e from master
[1.7.x] Fixed #21353 -- Noted that description is ignored for TabularInlines.

Thanks nofinator for the report.

Backport of d5031ecf88 from master
[1.7.x] Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.

Thanks err for the report.

Backport of 58161e4e from master.
[1.7.x] Fixed #22321 -- Wrapped exceptions in _set_autocommit.

Refs #21202.

Backport of 3becac84 from master
[1.7.x] Fixed #21239 -- Maintained atomicity when closing the connection.

Refs #15802 -- Reverted #7c657b24 as BaseDatabaseWrapper.close() now
has a proper "finally" clause that may need to preserve self.connection.

Backport of 25860096 from master.
[1.7.x] Fixed #21202 -- Maintained atomicity when the server disconnects.

Thanks intgr for the report.

This commit doesn't include a test because I don't know how to emulate a
database disconnection in a cross-database compatible way.

Also simplified a 'backends' test that was constrained by this problem.

Backport of 81761508 from master
[1.7.x] Increased robustness of 58161e4e. Refs #22291.

Backport of ee837b9a from master
[1.7.x] Fixed #22419 -- Typo in docs/topics/db/multi-db.txt.

Thanks Josh Kupershmidt.

Backport of c487b1e230 from master