Hamas said an agreement had been reached to resolve the dispute during a visit to Cairo by a delegation headed by Khalil al-Hayya, a top political official in the group