Robustness Guarantees for Mode Estimation with an Application to Bandits