Limiting sugar before the age of two is linked to a lower risk of dementia later in life, research suggests..