Qatari emir visits Gaza in boost to Hamas rulers