Graphyne as the anode material of magnesium-ion batteries: Ab initio study