Support for buffer retention and include example.

This commit introduces ``DelimitedBuffer`` type, which functions as
a reusable buffer for message encoding and decoding.  A strong
critique of the old implementation is that it carelessly allocated
ephemeral buffers, so this is a means of alleviating problems around
that.