Donald J. Trump, the Republican presidential nominee, in Cleveland on Wednesday. In an interview, he suggested that he would use a country’s level of military spending as a factor in deciding whether the United States would honor its commitment to defend NATO allies.