Big changes to be compatible with new Rust.

There were apparently some serious changes made to the way
trait objects work. It's likely that my code was potentially
unsafe and only worked because of a bug in Rust.

In any case, it has been fixed. Fixing it resulted in removing
the StrEncoder type, which is quite nice IMO.