Haitham bin Tariq Al Said, who has served important diplomatic roles, to take over as the Gulf state's ruler; thousands attend funeral of late monarch