Marine Corps Gen. Joseph Dunford will take over the command of NATO troops in Afghanistan on Sunday, as U.S. Gen. John Allen said the troops had come a “long way” toward winning the counterinsurgency.