Fixed #23444 -- Prevented unnecessary ContentType object creation when using inlines

ContentType object is mistakenly created for `through` model of M2M relation when it is used in inline.
Two things:

1. You need to add a test to check that the RemovedInDjango20Warning warning raised correctly.
2. You also need to add an entry to `docs/releases/1.8.txt` and `docs/internals/deprecation.txt`.

Please see https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#deprecating-a-feature for detailed documentation.