[IMP] models, registry: optimize the loading of the registry (speedup: 50%)

The setup of fields v8 is relatively costly, and was done after each module is
loaded. Optimize this by doing the setup only after each installed or upgraded
module, or after all modules are loaded.