Started moving towards a more performant architecture.

You now must allocate buffers through a pool and release them.
Fixed a bug where used buffers that were returned to a pool didn't reset their
writepos.