Justice Anthony Kennedy announced his retirement, setting the stage for a monumental battle over the nation’s constitutional direction, handing President Trump the chance to cement the Supreme Court’s conservative course and stoking raw passions going into this fall’s battle for Congress.