Entanglement dynamics for a conditionally kicked harmonic oscillator