Learning Theory for Continual and Meta-Learning