[TASK] Shorten database names in functional tests

The functional tests frameworks create a new database per test.
The database name is generated by the original database
name plus a string and a hash.

If the database name length exceeds the maximum length of 64
characters an exception is now thrown.

The generated database name is also been shortened a bit.

Resolves: #51383
Releases: 6.2
Change-Id: I5817e440a3dcba7e53e2a27dca4f7bfc679334f5
Reviewed-on: https://review.typo3.org/23356
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn