Stability in Online Learning: From Random Perturbations in Bandit Problems to Differential Privacy