ICE must either improve conditions for detainees or stop using a New York holding facility, judge rules