Thousands of people with sleep apnea and other illnesses had sued the company, claiming flawed devices were harming them.