This avoids storing direct copies of incoming objects and
makes sure that we always merge incoming objects (if a
saved object already exists) or create a copy of the
incoming object if it does not exist when storing.
On retrieval we also always return copies instead of
returning the data that is stored internally to avoid the
problems that can be hard to detect when users (engine
or other) modify those source objects.
Fixes bug 1365830
Also fixes a retry test case issue that was discovered due
to this more easily useable/understandable memory backend
changes...
Change-Id: I2afdda7beb71e35f7e12d9fd7ccf90b6c5447274