A theoretical framework for M-posteriors: frequentist guarantees and robustness properties