A chromosome map to unveil stellar populations with different magnesium abundances. The case of ω Centauri