Heart rate linked to dementia risk in new study