Integrated Thermochemical Conversion Processes for the Production of Soil Amendments and Biofuels from Agricultural Waste