Medication use and cognitive impairment among residents of aged care facilities