[TASK] Implement getDatabase to FunctionalTestCase

Fiddling with database records is a common use case in
functional tests. The patch implements a getDatabase()
method to FunctionalTestCase for easy IDE auto completion
and uses it in activated test cases.

Change-Id: I8900457ff1c31e1f1d731337be17431ccf89b379
Resolves: #51167
Releases: 6.2
Reviewed-on: https://review.typo3.org/23187
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn