One in seven eight-year-old girls with a smartphone has received sexually explicit texts, a study of millions of messages has found.