Fix sessions using newTempBase or collections

Fixes after !1451 

With the RAM implementation it was possible to use in session:
 - list or dict of temp documents
 - temp documents created with `newTempBase` ( not just `newContent(temp_object=True, ...)` )

This repairs these two use cases.

See merge request !1533
10 jobs for fix/duplicate_action in 0 seconds
Status Job ID Name Coverage
  External
failed ERP5.UnitTest-Master

03:47:27

passed SlapOS.Eggs.UnitTest-Master.Python2

00:12:21

passed SlapOS.Eggs.UnitTest-Master.Python3

00:14:09

failed ERP5.UnitTest-Master

00:00:09

failed ERP5.UnitTest-Master

failed ERP5.UnitTest-Master

03:56:27

passed SlapOS.Eggs.UnitTest-Master.Python2

00:10:23

passed SlapOS.Eggs.UnitTest-Master.Python2

00:18:51

passed SlapOS.Eggs.UnitTest-Master.Python3

00:15:58

passed SlapOS.Eggs.UnitTest-Master.Python3

00:12:26