Heralded single-photon absorption by a single atom