(PUP-3203) Windows scheduled task triggers can't be updated

This builds on PR #3158

Previously, if the Windows scheduled task provider needed to update a trigger, it would try to remove the current trigger, and add the new trigger in its place. However, along the way, the provider deleted the 'index' of the current trigger, leading to the error:

     no implicit conversion from nil to integer

This commit ensures we don't mutate the current trigger, so that we can delete it later if necessary.