Z-scheme SnO2−x/g-C3N4 composite as an efficient photocatalyst for dye degradation and photocatalytic CO2 reduction