Entanglement dynamics and decoherence of an atom coupled to a dissipative cavity field