Remove libc from std

These wrappers are bound to a specific libc, and they don't need to be part of
libstd.
Change how the readdir/opendir hack works
Fix fallout from std::libc separation