[BUGFIX] Make Typo3DbBackend use DatabaseConnection

While Typo3DbBackend claims to be Extbase's connection to
the TYPO3 API, in reality it writes a lot of SQL state-
ments itself. This replaces self-written statements with
the according DatabaseConnection API call.

Releases: 6.2
Resolves: #55571
Change-Id: Ia4f6ef0aadda16b6c5e89c7b36c8f91b185aac25
Reviewed-on: https://review.typo3.org/27254
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Mathias Brodala
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind