Add ut-compressed_stream seek.
Log an error if close() throws in ~compressed_stream.
flush_block: Check for null pointers.
Use proper bufferState/seekState semantics.

Only change bufferState when seekState is set to none,
and don't check bufferState when seekState is not none.
Document bufferState/seekState usage.