Federal judges and foreign leaders are acting as the emergency brakes to Trump as he pushes to remake the world.