Generalized Preference Optimization: A Unified Approach to Offline Alignment