As American troops prepare to withdraw from Afghanistan in the next two years, ending a conflict that started as an effort to crush al-Qaeda after the September 11, 2001, attacks, Washington and other Western capitals face the grim threat of a virulent new al-Qaeda wing capable of a broad reach.