Commutator methods for the spectral analysis of uniquely ergodic dynamical systems