In Afghanistan, Mr. Carter’s remarks were seen as an attempt to quell concerns over how the transition in Washington could affect the American presence here at a time when the Afghan forces, which have taken heavy losses, have shown the need for sustained help.