Electrochemical doping of anatase TiO2 in organic electrolytes for high-performance supercapacitors and photocatalysts