Substitutional nitrogen atom in diamond. A quantum mechanical investigation of the electronic and spectroscopic properties