Bipolar resistive switching of Au/NiOx/Ni/Au heterostructure nanowires