Efficient titanium nitride/titanium oxide composite photoanodes for dye-sensitized solar cells and water splitting