Three-mode principal component analysis and perfect congruence analysis for sets of covariance matrices