A Devon library is astonished as a children’s book, overdue for 31 years, is returned anonymously