Code to diagonalize quaternion matrices using symmetry-adapted eigenvectors. See http://mathoverflow.net/questions/147068/diagonalization-of-quaternion-matrices