The Role of Electron Collisions in Lasing in Neutral and Singly Ionized Molecular Nitrogen