Killed in an Israeli attack, he was Iran’s leading national security official and a confidant of the former supreme leader. He led a brutal crackdown on protests this year.