The high court handed President Donald Trump a defeat by upholding birthright citizenship, but Republicans also scored a pair of victories.