Circuit Stability Characterizes Language Model Generalization