Transferring multiqubit entanglement onto memory qubits in a decoherence-free subspace