Excitation and charge transfer in low-energy hydrogen atom collisions with neutral carbon and nitrogen