Replace C types with Rust types in libstd, closes #7313