Optimize registry.setup_models() such that some fields can be reused between registries. This happens when a model has the same base classes as another model.
This reduces the registry setup time.
On the runbot, this reduces the total execution time by ~20%.