Meta settles closely watched school district lawsuit weeks ahead of trial