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.
Fixed #20600 -- ordered distinct(*fields) in subqueries
Fixed #17001 -- Custom querysets for prefetch_related.

This patch introduces the Prefetch object which allows customizing prefetch
operations.

This enables things like filtering prefetched relations, calling select_related
from a prefetched relation, or prefetching the same relation multiple times
with different querysets.

When a Prefetch instance specifies a to_attr argument, the result is stored
in a list rather than a QuerySet. This has the fortunate consequence of being
significantly faster. The preformance improvement is due to the fact that we
save the costly creation of a QuerySet instance.

Thanks @akaariai for the original patch and @bmispelon and @timgraham
for the reviews.
Added more items to the release checklist.
Fixed #20536 -- rewrite of the file based cache backend

 * Safer for use in multiprocess environments
 * Better random culling
 * Cache files use less disk space
 * Safer delete behavior

Also fixed #15806, fixed #15825.
Removed no longer relevant word
Added 1.4.10 release notes.
Fixed #13725 -- take url scheme into account in assertRedirects

Scheme is handled correctly when making comparisons between two URLs. If
there isn't any scheme specified in the location where we are redirected to,
the original request's scheme is used. If present, the scheme in
``expected_url`` is the one used to make the comparations to.
Merge pull request #1850 from unaizalakain/ticket_13725

Fixed #13725 -- take url scheme into account in assertRedirects

Thanks to Loic for review.
Fixed #5849 -- Strip whitespace from blocktrans

Add the trimmed option to the blocktrans tag to trim any newlines and
whitespace from its content.

This allows the developer to indent the blocktrans tag without adding
new lines and whitespace to the msgid in the PO file.

Thanks to mpessas for the initial patch and Dmitri Fedortchenko for the
report.
Fixed a couple flake8 warnings.
Fixed #21396: Document backwards-incompatible change in RedirectView.get_redirect_url.

Thanks to Tim for the review.
Removed obsolete locale restriction admonition

Refs #14461. Thanks Ramiro Morales for pointing this.
Fixed #13970 -- Made SelectDateWidget use the standard widget is_required attribute

Thanks mitar for the report and Tim Graham for the review.
Fixed #17529 -- get_template_from_string default arguments break

``get_template_from_string`` default arguments were breaking
``assertTemplateUsed``. The solution has been to return only the names of the
templates with a ``name`` attribute distinct of ``None``. The default ``name``
kwarg of ``Template`` has been changed to ``None``, more pythonic than ``'<Unknown
Template>'``.
Fixed a typo in admindocs template

Thanks Reza Mohammadi for the report.
Flake8 fix -- correct number of newlines between top level definitions
Added missing parameter in npgettext_lazy docs
Fixed docs for EmailMessage extra_headers attribute

The EmailMessage documentation describes the initialization parameters
and states they 'can be set at any time prior to calling the send()
method.'. However, the 'headers' parameter's corresponding attribute is
called 'extra_headers'.
Noted that .clear() will delete intermediary models