Self-consistent model for quantum well infrared photodetectors with thermionic injection under dark conditions