When Iran’s leaders and senior military commanders paid tribute to the slain supreme leader, Ayatollah Ali Khamenei, in the elaborate, weeklong funeral that began on Friday, it was supposed to be a display of strength, endurance and unity after war with the United States and Israel. A military band played an anthem.