how is the ore of magnesium process to obtain magnesium