split module dict from core.
fix test and rime_console.
automatically register modules when loading shared libraries.
after refactoring, the deprecated api can now be supported for source code compatibility.