The influence of crystallinity on the resistive switching behavior of TiO2