Closure Properties for Private Classification and Online Prediction