Taliban sweep in Afghanistan follows years of US miscalculations