Electrostatic field measurements and band flattening during electron-transfer processes at single-crystal TiO2 electrodes by electric field-induced optical second harmonic generation