Insight into Phase Stability in the Mg-Pt System. The Ab Initio Calculations