Would be good to have this (without requiring the user to look inside the `IOBuffer`) as a copy-free alternative to `String(take!(buf::IOBuffer))`.