The Clinton Foundation accepted millions of dollars from seven foreign governments during Hillary Rodham Clinton’s tenure as secretary of state, including one donation that violated its ethics agreement with the Obama administration, foundation officials disclosed Wednesday.