Eating the fungi more than twice a week cut people's risk of memory and language problems, a study found.