A new study links certain diets to better brain function and lower dementia risk. Researchers combined data from U.S. and Europe to clarify how eating habits affect thinking skills.