Cognitive function among religious and non-religious Europeans: a cross-national cohort study