Company that made millions of defective sleep apnea machines ordered to overhaul manufacturing