Scalable Continual Learning for Lifelong Foundation Models