Mourners at the ceremony in a large mosque just north of the capital Doha included Khaled Meshaal, who is tipped to be the new Hamas leader.