Wearable optical monitoring of brain function in healthy adults and people at risk of dementia