The drug manufacturer Allergan Finance announced a settlement with New York state and Nassau and Suffolk counties Wednesday, hours before it was set to offer its closing argument in New York's multidefendant civil opioid trial in Suffolk County.