First‐Principles Studies on the Atomistic Properties of Metallic Magnesium as Anode Material in Magnesium‐Ion Batteries