[TASK] Unify use of getter for $GLOBALS['TYPO3_DB']

Resolves: #57119
Releases: 6.2
Change-Id: I9be8b51fd695e2470e22fe084eeec507fd78f6f2
Reviewed-on: https://review.typo3.org/28578
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters