Porous titanium dioxide nanomaterials for photocatalytic and photovoltaic applications