Fixed ticket #21172

LiveServerThread.join() now behaves like threading.Thread.join().
LiveServerThread.terminate() is instead used to ask live http server to
terminate and close.
Flake8 fixes
Fixed #10461 -- bug in generic relation + annotate() case

This issue was fixed when the contenttype restriction was moved from
where clause to the join clause. So, this is tests only addition.
Fixed #18419 -- Full backwards compatibility for old language codes

Improved documentation about zh-* deprecation and upgrade path.

Thanks to Baptiste Mispelon for the code reviews.
Fix python2 breakage caused by e5e044da87800feb6ef63fef1765d8c05022d926.
Improved English in release notes for runserver.

Thanks Tim.
Added more tests and documentation for dictsort.

It's possible to use something like {{ foo|dictsort:'bar.baz' }}
but this wasn't tested or documented.
Fixed a documentation typo introduced by b914991b37.
Fixed #21387 -- Merge two very similar help texts.
Fixed another typo introduced by b914991b3705cb6c91013d962c55cda9deb18d83.

Thanks Claude for catching it.
Fixed typos in documentation.
Distinguish between browser-deprecated locales and internally
deprecated ones.

Thanks to bouke for pointing this out.
Massive migration optimiser improvements + RenameModel opn
Allow squashing of squashed migrations
Added missing info to the release checklist.
flake8 fixes
1.6 isn't under development any more.

Partial forward port of a71ff76 from stable/1.6.x.
Fixed #21376 -- New implementation for query join promotion logic

This commit introduced a new class JoinPromoter that can be used to
abstract away join promotion problems for complex filter conditions.
Query._add_q() and Query.combine() now use the new class.

Also, added a lot of comments about why join promotion is done the way
it is.

Thanks to Tim Graham for original report and testing the changes, and
for Loic Bistuer for review.
Fixed #11320 -- exclude() too aggressive in join promotion
Removed Query.setup_joins() and join() argument outer_if_first.

Instead always create new joins as OUTER.