On the moments of traces of two matrices in multivariate analysis