Qatari emir’s Gaza visit seen as move to wean Hamas away from Syria, Iran