Towards safe and efficient offline reinforcement learning: learning safety constraints and expressive policies via generative modeling