The New York City primaries underlined divisions in the party over Gaza, with implications for the 2028 election.