Quantum storage and manipulation of heralded single photons in atomic memories based on electromagnetically induced transparency