(PUP-1368) Fix for segfault when using scheduled_task type in Windows.
The win32-taskscheduler gem has a number of heap corruption bugs having
to do with copying strings from the Task Scheduler API.
This fixes those heap corruptions.
Additionally, a fix to a potential crash in the win32-api gem that was
discovered during investigation is also included in this fix.