The drugstore chain has faced issues from failed mergers to hundreds of lawsuits over the opioid crisis.