Lego owner Kirkbi A/S is buying U.S. video-learning firm Brainpop for $875 million, according to the companies, as the family behind the world’s largest toy maker expands into the education business.