Tablets are pushing TV sets and game consoles out of children’s bedrooms