KABUL — Afghanistan’s former president lashed out at both the United States and Pakistan on Wednesday, accusing them of using the Afghan war to further their own interests and calling on Washington to sanction Pakistani military and intelligence officials. In an interview with The Associated Press, Hamid Karzai said his country is in “terrible shape,” 16 years after the U.S.-led invasion that toppled the Taliban.