Teenagers should be considering their dementia risk, academics have said after a new study suggests that having an unhealthy childhood could affect the brain in later life.