Alternative solution to #196

Based off https://github.com/visionmedia/mocha/issues/333#issuecomment-7441955

Instead of synchronously writing to stdout/stderr wait for them to drain when exit is called.

Tested on node 0.8.7, 0.8.17, 0.10.2 on Windows 7 and it fixes problems with disappearing output when node is piped/redirected within powershell.
Merge pull request #421 from Nemo157/sync-node-output-196

Alternative solution to #196, proper wait for draining std channels.