On the thermomechanics of composites with imperfectly bonded interfaces and damage