The genomic and environmental sources of cognitive ability