A unified framework for information-theoretic generalization bounds