Quark mass renormalization in the MSbar and RI schemes up to the NNLO order