New York City has agreed to pay $4 million to Thabo Sefolosha, a forward with the N.B.A.’s Atlanta Hawks, to settle a federal lawsuit in which he accused five police officers of false arrest and using excessive force during an encounter outside a Manhattan nightclub, the city’s Law Department said on Wednesday.