Application::database() now returns the DatabaseManager instance if $connectionName is null, and an iDatabaseConnection instance if not