Iran threatens 'harsh retaliation' if the US or Israel strikes during Ayatollah Ali Khamenei's funeral, where officials expect up to 20 million mourners.