[BUGFIX] Prevent building empty IN () query by throwing exception

If $storagePageIds is empty Typo3DbBackend::addPageIdStatement()
InconsistentQuerySettingsException is thrown instead of creating
an invalid query

Fixes: #47167
Releases: 6.1, 6.0, 1.3
Change-Id: Ib52884573c9a09b791c0b090daaffc9b7d15b6a1
Reviewed-on: https://review.typo3.org/19861
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[TASK] Simplify propertyName-creation

Since PHP 5.3.0 function lcfirst() exists.

Resolves: #47171
Releases: 6.0, 6.1
Change-Id: I314ee3c14683283dc000daad41693294c12c62d2
Reviewed-on: https://review.typo3.org/19870
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUGFIX] Prevent call of updateReferenceIndex on unknown object

Fixes: #46418
Releases: 6.1, 6.0

Change-Id: I20ab919c2290edcf6478f8edc7a0eafe2bac7cbb
Reviewed-on: https://review.typo3.org/19032
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Frans Saris
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs
[TASK] Optimize persisting a dirty objectStorage

This change optimizes persisting a dirty objectStorage
by not removing and inserting/updating all relations,
but insert/update/remove only new/dirty relations.
In the issue a wiki page is linked with some additional infos.

Resolves: #28091
Releases: 6.1
Change-Id: I1e861b62df0379eb84126c7f70f82287e23f0bdd
Reviewed-on: https://review.typo3.org/3390
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs