Effect of AlN layer on the resistive switching properties of TiO2 based ReRAM memory devices