KABUL, Afghanistan — The American military says it has now fully withdrawn the last of the 33,000 “surge troops” sent to pacify Afghanistan two years ago, but they are leaving behind an uncertain landscape of rising violence and political instability that threatens to undo considerable gains in security, particularly in the former Taliban strongholds in the south and southwest.