The depth of the mess the United States finds itself in Afghanistan is encapsulated by the fact that it must now effectively rely on its enemy, the Taliban, as it extricates itself from the humiliating endgame of its longest war.