Millions of customers had their data stolen in a serious hack of a popular maker of technology for children.