Circular economy applied to nitrate removal: hydrogen generation and waste recovery in drinking water