Quantum-Dot-Based Mid-IR Single-Photon Detector With Self-Quenching and Self-Recovering Operation