Fixes #5400, display useful error message when a database connection cannot be achieved. Deprecating Config.badConfigurationFile event.