New York City has quietly reached settlements with several plaintiffs in a federal class-action lawsuit alleging that the city’s trespassing-enforcement policies in public housing complexes are discriminatory and unlawful, lawyers and others said this week.