A Stochastic Restricted Maximum Likelihood Method For Genomic Selection And Genome-Wide Association Studies