Compatibility changes for recent Rust changes

* `printfmt!` got removed.
* `MemReader`s and `MemWriter`s `buf` field became private. This changes `test::utils` to avoid using it and instead use existing APIs.

Builds on https://github.com/mozilla/rust/commit/c151d371fcfb51fbf4d84f0ef266e30d64acd71a