A CMOS single-photon avalanche diode sensor for fluorescence lifetime imaging