The settlement brings to a close a lawsuit whose events began a decade ago and stemmed from the #MeToo movement.