Get Str.encode working for new Buf implementation.

It now also returns utf8/utf16/utf32 types when appropriate, falling
back to blob8 for the rest of the cases. With this, both unpack.t and
pack.t now pass on JVM (will need some work on Parrot to get things to
work again there, though).