Characterization-Based Modeling of Retriggering and Afterpulsing for Passively Quenched CMOS SPADs