Learning-to-Optimize with PAC-Bayesian Guarantees: Theoretical Considerations and Practical Implementation