[FIX] ir_models: fix registry when we add/remove/modify a custom model/field

This fixes #1794.