The Democrats running in New York City’s mayoral primary have crisscrossed the five boroughs over several months to make their case to voters in person.