This settlement is among the largest in recent years as lawsuits seek to hold companies accountable for the US opioid epidemic.