States unveiled a historic $26 billion settlement with drug companies to resolve thousands of opioid-crisis lawsuits, paving the way for communities across the country to secure a jolt of funding to address an epidemic in painkiller addiction that hasn’t abated.