encoder: Add a method to emit the headers into an io::Write
encoder: Add a method to emit the headers into an io::Write

When using this method, the caller can therefore provide a buffer into
which the encoded header representations should be written, which makes
it unnecessary for the encoder to do any dynamic memory allocations.

The original `encode` method that returns a new dynamically allocated
`Vec` containing the encoded representation of the given headers is kept
for convenience for those clients that do want the functionality.

mlalic/hpack-rs