Restricted maximum-likelihood method for learning latent variance components in gene expression data with known and unknown confounders