Analog and bipolar resistive switching in pn junction of n-type ZnO nanowires on p-type Si substrate