Add OwnedStr::into_bytes

My primary use case here is sending strings across the wire where the
intermediate storage is a byte array. The new method ends up avoiding a
copy.
Merge pull request #8733 from sfackler/str-to-bytes

Add OwnedStr::into_bytes