Impacted versions: 11.0 Enterprise atleast (V9 & 10 too probably)

Steps to reproduce:
1. Create a new database
2. Install the `purchase` module
3. Install the `odoo_studio` module
4. Activate developer mode
5. Go to purchases > purchase orders and create a draft purchase order. Then open up the studio and create a new monetary field. The new field should have the following settings:
- readonly
- required
- widget = monetary
![image](https://user-images.githubusercontent.com/6352350/35973264-0f372f46-0cd5-11e8-8b79-1516c2fa4fef.png)
6. Click on the "More" button and activate tracking for this field too:
![image](https://user-images.githubusercontent.com/6352350/35973298-308bfb18-0cd5-11e8-9475-cafeb447579b.png)
7. Save all these changes and go back to the apps list. Now try to install another app, for example `project`. You'll now get a traceback:
![image](https://user-images.githubusercontent.com/6352350/35973342-52005578-0cd5-11e8-90a5-695706dcf4c9.png)

Current behavior: You cannot install new modules or update existing modules anymore. The `track_visibility` breaks the framework.

Expected behavior: You can install new apps and update existing apps without any issues.


addons/mail/models/ir_model.py
query = "DELETE FROM mail_followers WHERE res_model IN %s"
        self.env.cr.execute(query, [tuple(self.mapped('model'))])
        return super(IrModel, self).unlink()
    @api.multi
    def write(self, vals):
        if self and 'is_mail_thread' in vals:
            if not all(rec.state == 'manual' for rec in self):
                raise UserError(_('Only custom models can be modified.'))
            if not all(rec.is_mail_thread <= vals['is_mail_thread'] for rec in self):
                raise UserError(_('Field "Mail Thread" cannot be changed to "False".'))
            res = super(IrModel, self).write(vals)
            
            self.pool.setup_models(self._cr)
            
            models = self.pool.descendants(self.mapped('model'), '_inherits')
            self.pool.init_models(self._cr, models, dict(self._context, update_custom_fields=True))
        else:
            res = super(IrModel, self).write(vals)
        return res
    def _reflect_model_params(self, model):
        vals = super(IrModel, self)._reflect_model_params(model)
        vals['is_mail_thread'] = issubclass(type(model), self.pool['mail.thread'])
        return vals
    @api.model
    def _instanciate(self, model_data):