Add serialization support for StrBuf

- implement Encodable and Decodable for StrBuf
- implement to_json for StrBuf
auto merge of #13875 : hjr3/rust/serialize-strbuf, r=alexcrichton

- implement Encodable and Decodable for StrBuf
- implement to_json for StrBuf