The propagation of discontinuities in non-homogeneous thermoviscoelastic media