Tens of thousands of people turned out for the funeral of Iran's former President Ali Akbar Hashemi Rafsanjani in the capital Tehran. The 82-year-old died of a heart attack on Sunday.