[IMP] registry loading: setup models only if necessary

When loading the registry without any module installation/upgrade, models are
set up once instead of twice.  In other cases, models are always set up before
installations/upgrades.