Hyperfine interactions of constituent quarks and the mass spectrum of tetraquark states