On The Local Sensitivity Of M-Estimation: Bayesian And Frequentist Applications