## Impacted versions:
 8.0 / 9.0 / 10.0
## Steps to reproduce:
* see https://github.com/odoo/odoo/issues/11841
* in a shell
  1. create an in memory record `order = self.env['purcahse.order'].new({....})`
  2. create an in memory record with a reference to the first one `order_line = self.env['purchase.order.line'].new({'order_id': order, ....})`
  3. order_line.order_id is an in memory recordset
  4. create a record for a model that inherits from mail.thread `self.env['product.product'].create({....})`
  5. At this stage order_line.order_id is an empty recordset

## Current behavior:
 In memory records are dropped when a call is done to self.invalidate_cache
## Expected behavior:
In memory records are preserved when a call is done to self.invalidate_cache


There are lot of places where the method `invalidate_cache` is called and the silent removal of the in memory records from all environments has unpredictable effects on fields modified by a computed method or an onchange or even related fields .... Moreover since all caches are invalidated each time you create / write / unlink  (https://github.com/odoo/odoo/blob/10.0/addons/mail/models/mail_followers.py#L111) an instance of a model that inherits from 'mail.thread', the performances of the server are severely penalized.

OPW703903

'compose wizard: mail_post_autofollow and mail_create_nosubscribe context keys not correctly taken into account')
        # Do: Compose in mass_mail, coming from list_view, we have an active_domain that should be supported
        compose_id = mail_compose.create(cr, user_raoul.id,
            {
                'subject': _subject,
                'body': '${object.description}',
                'partner_ids': [(4, p_c_id), (4, p_d_id)],
            }, context={
                'default_composition_mode': 'mass_mail',
                'default_model': 'mail.group',
                'default_res_id': False,
                'active_ids': [self.group_pigs_id],
                'active_domain': [('name', 'in', ['Pigs', 'Bird'])],
            })
        compose = mail_compose.browse(cr, uid, compose_id)
        # Do: Post the comment, get created message for each group
        mail_compose.send_mail(
            cr, user_raoul.id, [compose_id], context={
                'default_res_id': -1,
                'active_ids': [self.group_pigs_id, group_bird_id]
            })
        group_pigs.refresh()
        group_bird.refresh()
        message1 = group_pigs.message_ids[0]
        message2 = group_bird.message_ids[0]
        # Test: Pigs and Bird did receive their message
        test_msg_ids = self.mail_message.search(cr, uid, [], limit=2)
        self.assertIn(message1.id, test_msg_ids, 'compose wizard: Pigs did not receive its mass mailing message')
        self.assertIn(message2.id, test_msg_ids, 'compose wizard: Bird did not receive its mass mailing message')
    def test_30_needaction(self):