A Statistical Theory of Regularization-Based Continual Learning