The government expelled Iran’s diplomats, saying the country was behind the attacks on a Melbourne synagogue and a Sydney restaurant last year.