binary/writer: Reimplement WriterToken as a contractual interface
We now allow encoding directly to a file, which saves on many, many
in memory copies. To permit this, a WriterToken implementation is
in place that allows writing a temporary "dumb" (corrupt) header to
the stream.
Once all payload encoding is complete, we rewind to the first payload
in the file and begin emitting the corrected payload headers with all
the right information (size/ compression / etc).
Right now we only support basic PlainWriterToken but we'll quickly
restore zlib + zstd.
Signed-off-by: Ikey Doherty <ikey@serpentos.com>