Fixed a broken test introduced in 6fa7d7c5. Refs #21553.

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

Thanks Tim for review.

Backport of 7e3834adc9 from master
[1.6.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.6.x] Fixed #21353 -- Noted that description is ignored for TabularInlines.

Thanks nofinator for the report.

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

Thanks err for the report.

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

Refs #21202.

Backport of 3becac84 from master
[1.6.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.6.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.6.x] Increased robustness of 58161e4e. Refs #22291.

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

Thanks Josh Kupershmidt.

Backport of c487b1e230 from master
Improved a comment. Thanks intgr for the report.
[1.6.x] Fixed #21760 -- prefetch_related used an inefficient query for reverse FK.

Regression introduced by commit 9777442. Refs #21410.

Conflicts:
	tests/prefetch_related/tests.py

Backport of d3b71b976d from master
[1.6.x] Fixed #22392 -- Corrected deployment instructions for Apache 2.4.

Thanks zjcheah at yahoo.com for the report.

Backport of 0f37d2e4c0 from master
[1.6.x] Added RemoteUserMiddleware to middleware reference page.

Backport of 465980d070a33555cdabb4787db50a4e23228de2 from master.
[1.6.x] Added a note regarding django.contrib.auth.authenticate.

Thanks Josh Brown for the suggestion.

Backport of ae5b662796 from master
[1.6.x] Fixed #22453 -- Corrected DoesNotExist message in docs.

Thanks Eugenio Cano-Manuel.

Backport of eefad142dee466c1ead6038fbeec75479b1afead from master
[1.6.x] Fixed #22457 -- Fixed contributing guide w/o github set-up

The published commnand was not working when the user did not have
the git client set-up with the public-key. Changed the contributing
guide to clone it from https instead.

Backport of 28102991172ab931d030412275f926c1b05c688d from master.
[1.6.x] Fixed #22220 -- Added more examples to reverse() documention.

Thanks EvilDMP for the suggestions.

Backport of 030dd4f72c from master
[1.6.x] Fixed #22454 - Changed compatibility warning hint for test runner.

Backport of 214d1e1b0f from master
[1.6.x] Fixed #22471 -- Corrected misprint in i18n docs

Backport of 54d5c37de6572eae57a66339bb38719e681cee82 from master.