Added regression test for #1340.

Child process must produce > 4096 bytes on STDERR (e.g., a large PHP backtrace).
Fixed #1340: Reading from STDOUT or STDERR hangs forever on Windows if the output is too large.

See https://bugs.php.net/bug.php?id=51800