Resistive-switching crossbar memory based on Ni-NiO core-shell nanowires