[BUGFIX] Cannot connect to the current database

DatabaseConnection::admin_get_dbs() iterates over all existing
databases during install process and tries to use each of them.
If that fails, an exception is thrown - which is not caught in
the mentioned method.

Change-Id: I5fdf08b867ead6535ce737fdceb86a977b539462
Fixes: #48138
Releases: 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/20732
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn