The impact of pain on the course of ADL functioning in patients with dementia