A new study shows that the gender gap in math abilities starts early—and teacher bias makes it worse as time goes on