Court’s liberal minority notched early wins but suffered defeats in the terms hot-button issues, including affirmative action and gay rights.