Generalization in the Face of Adaptivity: A Bayesian Perspective