Fixed #22321 -- Wrapped exceptions in _set_autocommit.

Refs #21202.
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.
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.
Increased robustness of 58161e4e. Refs #22291.
Fixed #22419 -- Typo in docs/topics/db/multi-db.txt.

Thanks Josh Kupershmidt.
Improved a comment. Thanks intgr for the report.
Fixed #22102 -- Made SimpleTestCase tests run before unittest.TestCase ones

Thanks aptiko for the reporti and Tim Graham for the review.
Also allowed a non-overridden setting to be deleted

Refs #20032, #18824. Thanks ztorstri at gmail.com for the report.
Fixed #21760 -- prefetch_related used an inefficient query for reverse FK.

Regression introduced by commit 9777442. Refs #21410.
Fixed stray comment introduced by d3b71b9.

Thanks Claude Paroz for the report.
Fixed #22350 -- Consistently serialize bytes and text in migrations.

Thanks to @treyhunner and Loïc for their suggestions and review.
Fixed #22398 -- Added detail about callable in KEY_FUNCTION docs
Merge pull request #2541 from arachnegl/22398_KEY_FUNCTION_doc_detail

Fixed #22398 -- Added detail about callable in KEY_FUNCTION docs
Improve migrations/schema docs
Fixed #22369 -- Added count parameter to assertTemplateUsed
Fixed #22356 -- Added a check to make sure unique_together fields are local.
Refs #18586 - Refactored model get_or_create test.

Refactored get_or_create test into several smaller test functions across two
different test classes. Also converted the comments over to docstrings.
Merge pull request #2553 from liavkoren-vmfarms/ticket_18586

Ticket 18586
Fixed #22392 -- Corrected deployment instructions for Apache 2.4.

Thanks zjcheah at yahoo.com for the report.
Fixed #22443 -- Document smtp.EmailBackend.timeout default value

Django 1.7 introduces a new timeout parameter for the SMTP email backend:
http://docs.djangoproject.com/en/dev/topics/email/#django.core.mail.backends.smtp.EmailBackend.timeout

However, there was no mention of the default value for this parameter.