Is medication use by community-dwelling elderly people influenced by cognitive function?