Restore the statement timeout after counting dashboard links (backport #43399)
The one-second statement timeout used when counting dashboard links is removed afterward, so later queries in the same request, job or test run no longer fail with max_statement_time exceeded.