Potential energy surfaces of Mg+N2 and quenching of the 3P and 1P states of Mg. A theoretical ab initio SCF CI study