Foods rich in flavonoids (such as apples, berries, or tea) are important for cognitive health, research suggests