Meta agrees to sweeping changes, $18 billion payout in landmark state settlement