With former President Barack Obama nipping at his heels in Europe, President Trump neared the end of his first foreign trip Thursday by largely fulfilling a transformative agenda that was more ambitious than anything Mr. Obama tried overseas during his first year in office. On his nine-day trip, Mr. Trump has hit most, if not all,…