First-principles prediction of layered MoO2 and MoOSe as promising cathode materials for magnesium ion batteries