Matrix variational calculations of electron scattering by C, N, and O atoms