[BUGFIX] Incomplete mocking in Bootstrap test

ReflectionService is not properly mocked in one of the extbase
bootstrap tests and can raise a warning (in travis) that some
related database table does not exist.

Change-Id: Iadf021887b1636d0147ef5d75e63edf290bfeceb
Releases: 6.2, 6.1
Resolves: #47715
Related: #39140
Reviewed-on: https://review.typo3.org/20326
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Fix persisting of lazy object storages

Lazy object storages saved in the clean state of a
parent object get initialized during persisting and
set the clean state of the parent object to the current changed
state. After that the persistence backend cannot detect any
changes and skips persisting of the changed relations.

This fix checks if the lazy object storage is already part
of the parents clean state and skips the memorization in
this case.

Fixes: #47703
Releases: 6.2, 6.1
Change-Id: I6801ca8ff709253ac33c65bc619b5d794f5615ce
Reviewed-on: https://review.typo3.org/20335
Reviewed-by: Nico de Haen
Tested-by: Nico de Haen
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs