Ce$_{3-x}$Mg$_x$Co$_{9}$: transformation of a Pauli paramagnet into a strong permanent magnet