Fixed #23867 -- removed DateQuerySet hacks

The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
Fixed #23801 -- Added warning when max_length is used with IntegerField
Fixed #23847 -- Improved the email_check example in the auth documentation.
Fixed #23875 -- cleaned up query.get_count()
Fixed #23877 -- aggregation's subquery missed target col

Aggregation over subquery produced syntactically incorrect queries in
some cases as Django didn't ensure that source expressions of the
aggregation were present in the subquery.
Fixed #14664 -- Logged a warning if MiddlewareNotUsed is raised in DEBUG mode.
Fixed typo in docs/topics/forms/modelforms.txt.
Added notes on registering signals in ready() and using dispatch_uid.

Refs #23641.
Fixed cache state dependence for assertNumQueries in test_group_permission_performance.

Refs #20432 and #23746.
Fixed #23641 -- Moved post_migrate signals for contrib apps to AppConfig.ready().
Fixed #23924 -- Made EmailMessage raise TypeError for type checks
Fixed #23338 -- Added warning when unique=True on ForeigKey

Thanks Jonathan Lindén for the initial patch, and Tim Graham
and Gabe Jackson for the suggestions.
Written a sketch of a basic create_default_site() test.
Added tests for default site respecting routing and SITE_ID.