ENH: Skip loading of loadable python module if loadable module are disabled

Before this commit even after disabling the loading of loadable module
the python module corresponding to "logic", "Widgets, "displayable
manager" and "mrml" where still imported. This commit prevent this.

Note that if a given loadable module is disabled with the application
settings the associated python modules will still be imported.

Ideally python module should be imported on a per module basis as it is
done for extension. This will be possible only after python module specific
to a loadable module are located in dedicated directory. This is
somewhat related to issue #1365

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22463 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix crash in CLIModuleFactoryHelper when used without SlicerApp

The "isInstalled" method will alaways return false if no Slicer
application has been instantiated.

Ideally the application home should be externally set. This is
tracked by issue #3411

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22464 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add option to disable loading of either any module or only the builtin

Before this commit, starting slicer with option
like --disable-{cli|loadable|scripted-loadable}-modules was preventing
the registration of the associated factories. It means that even if
an additional path was provided, it wasn't possible for the user to
disable the loading of the builtin module and enabling only the loading
of modules associated with the provided path.

This commit differentiate the concept of "any modules" vs "built-in" modules
by adding new command line options:

 disable-builtin-cli-modules

 disable-builtin-loadable-modules

 disable-builtin-scripted-loadable-modules

 disable-builtin-modules  (disable loading of all builtin modules)

 disable-modules (disable loading of any modules)

The modules settings panel has also been updated, it is now possible
to selectively disable the loading of either any modules or only the
built-in ones.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22465 3bd1e089-480b-0410-8dfb-8563597acbee