The influence of near-wall density and viscosity gradients on turbulence in channel flows