Implementing Robust M-Estimators with Certifiable Factor Graph Optimization