Template synthesis of CoSe2/Co3Se4 nanotubes: tuning of their crystal structures for photovoltaics and hydrogen evolution in alkaline medium