Control of entanglement dynamics in a system of three coupled quantum oscillators