Gulf and Egypt markets gain after US-Iran deal