Exploring the relationship between cognition and self-reported pain in residents of homes for the elderly