Information-theoretic criterion for the performance of single-photon avalanche photodiodes