A healthy toddler was given a 50/50 chance to live when doctors realised that a common illness had triggered a rare condition that attacks the brain