Optimization of the Performance of Dye-Sensitized Solar Cells Based on Pt-Like TiC Counter Electrodes