django.utils.autoreload.get_child_arguments() detected when Python was
started with the `-m` option only for `django` module. This commit
changes the logic to check __spec__, see
https://docs.python.org/3/reference/import.html#main-spec
Now packages can implement their own __main__ with the runserver
command.
Previously the FORMAT_MODULE_PATH setting only accepted one string (dotted
module path).
This is useful when using several reusable third party apps that define new
formats. We can now use them all and we can even override some of the formats
by providing a project-wide format module.
We want to be able to use it for instance for discovering `tasks.py` modules
inside the INSTALLED_APPS.
This commit therefore moves the logic to `autodiscover_modules` method in
django.utils.module_loading.