[1.7.x] Fixed #22699 -- Configure default settings in some management commands.

This makes it possible to run django.setup() in management commands that
don't need a settings module. In addition it simplifies error handling.

Thanks Claude for the review.

Backport of 4865326f from master.
[1.7.x] Added a word to the docs wordlist.
[1.7.x] Fixed #22601 -- Added a note about model inheritance.

Thanks semenov for the report.

Backport of 2ea1e70b85 from master