Cuomo, the state’s former governor, was waging a political comeback and was seen as the moderate choice