Resistive switching and photovoltaic effects in ferroelectric BaTiO3-based capacitors with Ti and Pt top electrodes