During his presidential campaign, and in his early days in office, Mr. Trump’s approach to foreign policy included speaking warmly of Mr. Putin and the prospects of a United States alliance with Russia.