Fix sessions using newTempBase or collections
Fixes after nexedi/erp5!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 nexedi/erp5!1533