Treatment of thermoset composites at the end of lifecycle