Mr. Trump's outrage at NATO allies over their failure to join in his war against Iran had prompted fears he would seek to pull the United States out of the nearly eight-decade-old alliance