In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning