Well-posedness results for a model of damage in thermoviscoelastic materials