Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.

Since assignments on M2M or reverse FK descriptors is composed of a `clear()`,
followed by an `add()`, `clear()` could potentially affect the value of the
assigned queryset before the `add()` step; pre-evaluating it solves the problem.

This patch fixes the issue for ForeignRelatedObjectsDescriptor,
ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor.
It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
Merge pull request #2487 from loic/ticket19816

Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.
Fixed mistake in tests from commit 2039908. Refs #19816.
Merge pull request #2495 from loic/ticket19816

Fixed mistake in tests from commit 2039908. Refs #19816.
Fixed #22338 -- Fixed a test dependent on dictionary key iteration order.
Ensure that a file is closed in the tests
Corrected many style guide violations that the newest version of flake8 catches
Added Python 3.4 to classifiers in setup.py.
Corrected an import in a model form docs example.
Fixed #22359 -- Changing M2M field to blank=True failed on sqlite.
Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies.
Fixed typo in docstring.
Added 1.6.3 release note for refs #22250.
Fixed #21795 -- Made add_preserved_filters account for url prefixes.

Thanks to trac username honyczek for the report. Refs #6903.
Replaced urllib/urlparse imports with from django.utils.six.moves.
Fixed #22362 -- Improved AuthenticationMiddleware assertion message.

Thanks Keryn Knight.
Fixed #22360 -- Fixed two non-deterministic tests in Python 3.4.

The order of admin's changelist filters in the querystring relied on
dict ordering.
Added test to confirm #12583 resolution
Fixed #22327 -- Turned BaseEmailBackend into a context manager

Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.
Added 1.6.3 release note for refs #22256.