Iran's slain supreme leader Ayatollah Ali Khamenei will be farewelled at a public ceremony in Tehran before being buried in his home city of Mashhad.