Merge pull request #1920 from mattrobenolt/unboundlocalerror

Fixed #21439 -- Propagated get_user_model exception from get_user
Fixed #21432 -- DateTimeQuery now copies tzinfo when cloning.

Thanks Enrique Martínez for the report and @bmispelon for the tests.
Added backported fixes to 1.6.1 release notes.
Fixed typo and slightly improved error message when db is missing time zone definitions.

Refs #21432.
Fixed #21440 -- Typo in topics/http/shortcuts.txt

Thanks olof.bjarnason at gmail.com for the report.
Merge pull request #1921 from loic/ticket21432

Fixed typo and slightly improved error message when db is missing time zone definitions.
Fixed the use of the -ise suffix, where -ize is prefered
Fixed #21425 -- Made order in which loggers are introduced consistent.

Thanks oubiga for the suggestion.
Clarified MySQL Connector note.
Configure settings sooner in makemessages

As get_text_list is using translations, setup settings before
calling it.
Fixed #21415 -- Replaced escape sequence by literal non-breaking space

Unfortunately, escape sequences (\x.. or \u....) do not fit well
with the gettext toolchain. Falling back to using literal char,
even if visibility is not ideal.
Fixed #21440 -- Typo #2 in topics/http/shortcuts.txt

Thanks alasdair.
Fixed #21447 -- Restored code erroneously removed in 20472aa827669d2b83b74e521504e88e18d086a1.

Also added some tests for HttpRequest.__repr__.
Note that the added tests don't actually catch the accidental code
removal (see ticket) but they do cover a codepath that wasn't tested
before.

Thanks to Tom Christie for the report and the original patch.
Moved import at proper place in contrib.sites
Fixed #21428 -- editable GenericRelation regression

The GenericRelation refactoring removed GenericRelations from
model._meta.many_to_many. This had the side effect of disallowing
editable GenericRelations in ModelForms. Editable GenericRelations
aren't officially supported, but if we don't fix this we don't offer any
upgrade path for those who used the ability to set editable=True
in GenericRelation subclass.

Thanks to Trac alias joshcartme for the report and stephencmd and Loic
for working on this issue.
Fixed a regression caused by fix for #21428

On Python 3 sorting Fields mixed with GenericForeignKeys doesn't work
as GenericForeignKey isn't a subclass of django.db.models.fields.Field.

Refs #21428.
Updated 1.6.1 release notes

Partial forward port of e85baa813f.
Optimise admin images
Merge pull request #1931 from funkybob/admin-image-opt

Fixes #21455 - Optimise admin images

Every bit is sacred
Every bit is great
If a bit is wasted
God gets quite irate
Fixed #21404 -- Added session.set_expiry() note to 1.6 release notes.

Thanks pwr for the suggestion.