FromIterator impl for ByteString
Indexed was reporting an incorrect count when headers are present.
Make `write` more general and get better code reuse.

I do not think this is a breaking change.