Stable finite element approximations of thermal viscoelastic flows