Researchers trace a path from the gut to the brain and say managing diabetes could help to prevent dementia.