Khamenei's rule was marked by a combination of cruelty and incompetence. His death may have unfolded much the same way.