Biochar-based nanocomposites from waste biomass: a sustainable approach for wastewater treatment and renewable bioenergy