The Justice Department has sued TikTok, accusing the company of violating children’s online privacy law and contravening a settlement it had reached with another federal agency.