Dementia risk could be linked to walking speed, study suggests