Transition from half metal to semiconductor in Li doped g-C4N3