Video of the beating released by federal prosecutors raised difficult questions about how marginalized and poor people are treated in facilities run by New York City.