Implementing Entanglement Swapping with Trapped Atoms via Cavity Decay