Patch Writable to support objects

Writable now has the internal length counter handle objects and
doesn't try to decode them into buffers.

Tests have been added for the simple use cases.