Millions gathered in Tehran for Ayatollah Khamenei's funeral, marking the end of an era amid escalating tensions with the US, raising concerns about regional stability and future leadership.