Impact of delirium in critically ill patients on long-term health-related quality of life and cognitive functioning