Method for removing magnesium impurities in a manganese compound manufacturing process