The deal is expected to be one of the largest settlements against an opioid manufacturer, with funds for victims.