The settlement approval brings to a close the yearslong court battle over how county officials responded to a woman’s alleged 2017 sexual assault.