Harmonic tori in symmetric spaces and commuting Hamiltonian systems on loop algebras