Following the death of Iran’s supreme leader and the decimation of its security elite, the Islamic Republic faces deep internal fractures and mounting popular unrest, raising the prospect of a historic transition toward a democratic republic.