The Quranic verses recited at the funeral varied according to each country's ties with Tehran, from allies to regional rivals