Gaza factions agree on weapons restraint plan