The birthright ruling brings to an end a Supreme Court term that has delivered the president some key victories.