Thermodynamics of a non-simple heat conductor with memory