Add debug logging facility to track waits on external processes when EM_BUILD_VERBOSE >= 3. This helps pinpointing if the build hangs on some tool dying/live/deadlocking, and where it might occur.
Implement process.pid on WindowsPopen replacement so that EM_BUILD_VERBOSE=3 works on it as well.
- made test_stdin async to work in the node environment
- clearerr should reset both eof and error indicators
- fgetc was incorrectly setting the eof indicator. in cases where fread had errored with EAGAIN it was setting eof. I removed the set entirely, as there is no need for fgetc to even worry about it, fread will set the correct value in any case