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.
Added comments in the three empty models.py files that are still needed.
Adjusted the test runner to add applications corresponding to test
labels to INSTALLED_APPS even when they don't have a models module.