[BUGFIX] Tests: Incomplete mock of $GLOBALS['TYPO3_DB']

Still some unit tests rely on TYPO3_DB, mostly through the extbase
object manager. The patch fixes most occurrences and skips two
complex tests that should be moved to functional tests later.

This should be the final patch for tests accessing TYPO3_DB.

Change-Id: I8deb0fb9c13b47c8ce4262f041744def9e6b0e79
Resolves: #56947
Related: #51436
Releases: 6.2
Reviewed-on: https://review.typo3.org/28431
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[TASK] Tests: Do not initialize TYPO3_DB in unit tests

Change-Id: I9d147353411314416cdf1f5196d18a127e8c5145
Resolves: #56948
Related: #51436
Releases: 6.2
Reviewed-on: https://review.typo3.org/28432
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Merge remote-tracking branch 'upstream/master'