Merge pull request #1479 from nickbruun/ticket_20924

Proxy __len__ and __contains__ for LazyObject
Some code simplification
Made Model.__eq__ consider proxy models equivalent

Fixed #11892, fixed #16458, fixed #14492.
Fixed #20777 -- Admin proxy model deletion regression

Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
Fixed #12567 -- Incorrect SQL in model inheritance case

An isnull lookup produced incorrect SQL. This was already fixed
earlier, so only tests added.
PEP 8 cleanup
Minor oracle fixes
Add more stringent M2M tests and fix the bug they exposed
Fixed #12886 -- aggregation over sliced queryset
Fixed #11881 -- removed junk from aggregation subqueries

There were clauses that weren't needed in the subqueries. These were
ORDER BY, SELECT FOR UPDATE and related selections.
Fixed #12807 -- EmptyResultSet ORed condition

The EmptyResultSet wasn't treated correctly so the end results was
incorrect, too. The bug had been already fixed in master so only tests
added.
Removed versionadded/changed annotations for 1.5
Fixed GIS regression caused by force_subq

Caused by commit 7737305a4f5dc5006d92dac3a61523ad6c2a523a
Fixed #20640 -- Avoided NoReverseMatch in get_deleted_objects

The default delete action resulted in a NoReverseMatch if it were to
list any Model with a ModelAdmin with `get_urls` overridden to remove
the change url.  Catching the error and not displaying the link in that
case, as was already done for models with no registered admins.

Thanks Keryn Knight for the report.
Merge remote-tracking branch 'core/master' into schema-alteration

Conflicts:
	docs/ref/django-admin.txt
Correctly format missing Pillow/PIL exceptions messages. refs #19934
Avoid importing the deprecated `django.utils.importlib` package.
Fixed an aggregation test failure on MySQL.
Fixed #20943 -- Weakly reference senders when caching their associated receivers
Fixed #14043 -- Made sure nullable o2o delete works as expected

There was an old complaint about nullable one-to-one field cascading
even when the o2o field was saved to None value before the deletion.
Added an test to verify this doesn't happen.

Also some PEP 8 cleanup.