libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and
port all code over to use it.
Fix tests. Add Vec<u8> conversion to StrBuf.
auto merge of #13440 : huonw/rust/strbuf, r=alexcrichton

libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it.

Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269