The predominantly female 5,000 school safety agents in New York City have signed on to a class action lawsuit accusing the city of paying them less than special officers who perform similar work at homeless shelters and hospitals, a force that is predominantly male.