Memory-built-in quantum teleportation with photonic and atomic qubits