[perl #77672] avoid a file handle redirection race

With multiple threads (and Win32 fork() is implemented in terms of
threads), Win32's popen() code had a race condition where a different
thread could write to the stdout (or read from the stdin) handle setup
for a child process.

Avoid this by using the Win32 API to supply the I/O handles instead of
redirecting them in the current process.