YouTube has been fined $170 million to settle allegations it collected children's personal data without their parents' consent.