Democrats running for New York City mayor spoke almost in one voice to denounce Trump immigration officials’ detention of a Columbia University student who helped organize protests against Israel.