Sustainability optimization of the thermo-biochemical pathway for the production of second-generation ethanol