A study found that people who drink moderately have better cognitive function and a lower risk of heart disease.