Leveraging PAC-Bayes Theory and Gibbs Distributions for Generalization Bounds with Complexity Measures