[CORE] Avoid declaring "nidtbl" and "modtbl" structures as unused and static.

As being declared as static and unused, the "nidtbl" and "modtbl" structures
are removed from the objects compiled in -O1 or more optimized level, leading
to empty ".nidtbl" and ".modtbl" sections.
The module tree tables are now named with "__modtbl__" and the module name
(the compiled file name) to avoid multiple definitions.