Understanding pulsed-cycling variability and endurance in HfO<inf>x</inf> RRAM