How the economics of childhood have changed over 1,000 years