std.stdio: improve standardization of C I/O functions across runtimes

https://github.com/D-Programming-Language/phobos/pull/1093

Rebased version of pull from @kinke: https://github.com/D-Programming-Language/phobos/pull/1093