Compounds found in apples and fruit may help reduce dementia