Recasting Continual Learning as Sequence Modeling