Unraveling the intricacies of surface salt formation on Mg(0001): Implications for chloride-ion batteries