do not leak memory in the table

* keep one memory buffer per item.  buffer types and handling modeled
  after strbuf in vodik's repose
* smprintf is now only used for init

Fixes #1