[TASK] Functional tests: error if DB permissions are missing

The functional test framework needs create and drop
table database permissions.

Added a check that outputs an error message if the DB user
is not able to connect to the database or if the user
has not the required permissions to create a database.

Resolves: #51381
Releases: 6.2
Change-Id: I94c4eeb4356fdba06026ec727283807112c53926
Reviewed-on: https://review.typo3.org/23388
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn