FLUID-5168: refactoring

Using toArray for both include and exclude. Instead of using all modules for inclusions when include is false, this is done when none are provided by checking the length of the include array.

Also renamed the confusing dependencies object to allModules, as it is the merging of all the module dependency objects found.