Effect of crystallization on the reliability of unipolar resistive-switching in HfO2-based dielectrics