Detailed investigation of electron transport, capture and gain in Al0.3Ga0.7As/GaAs quantum well infrared photodetectors