A visit by Pakistan’s army chief to Tehran is seen as a sign of significant progress in negotiations.