Funeral ceremonies for Iran's former supreme leader are planned for July, as mediators say talks to end the war are close.