Ayatollah Khamenei led Iran for nearly four decades before he was killed in a joint campaign by the US and Israel on Saturday.