Defects, doping, and conduction mechanisms in nitrogen-doped tetrahedral amorphous carbon