Population genetic analyses of gene expression and complex traits