Thousands of rescue and cleanup workers who sued New York City over damaging health effects of working at the World Trade Center following 9/11 have reached a settlement with the city.