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
Removed redundant numbered parameters from str.format().

Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".