Public school pre-K programs provide a lasting academic advantage over family-based childcare, according to a new study of 400,000 students.