The death of a two-year-old boy after a medical episode at a children's nursery is being investigated by police.