Pulse characterization at the single-photon level through chronocyclic Q-function measurements