Thermal treatment of composite wastes for energy recovery