Restricted maximum likelihood estimation of genetic principal components and smoothed covariance matrices