John Swinney has suggested an Edinburgh Fringe comedy venue was right to cancel a run of shows by Jewish performers because staff had “safety concerns”.