Bipolar Resistive RAM Based on HfO2: Physics, Compact Modeling, and Variability Control