core: add m.modules.active.mod_foobar to test if a modules is active. Remove checks with the code server if a module is running.

(cherry picked from commit 18140efeed5686ae2b4f642cf9b9d7bdc7555f11)
m.modules: replace usage of m.modules.info. with m.modules.active.

(cherry picked from commit 75c9f9145da8f6f3700d78945d8e8f556d206c34)