Optimizing single-mode collection from pointlike sources of single photons with adaptive optics