Fix the capture_stderr test

There's always a fun time having two sets of standard libraries when testing!
Fix compilation on linux
Tweak the startup routine to pass on linux

We need to be sure to init thread_info before we init args for example because
args is grabbing locks which may entail looking at the local thread eventually.
Avoid .take().unwrap() with FnOnce closures