Iran and Saudi Arabia agree to resume ties after years of hostility