go: Encoder.version isn't exported, we don't need to validate it
go: only set compressed document type if body is compressed

This is a revert (+fixes) of 20500a29d15c2e15583f87a6a348109c0afb48b6.