A Variational Approach to Privacy and Fairness