Influence of tunable pore size on photocatalytic and photoelectrochemical performances of hierarchical porous TiO2/C nanocomposites synthesized via dual-Templating