Go: Move SnappyCompressor into its own file

Purely a cosmetic change to follow up on ce45bf3079 and keep diffs
cleaner. Zlib support is upcoming, hence it makes sense to tidy up a bit
and avoid pile up everything in encode.go.
Go: Document type must be always set

Code that sets document type resided under the if-condition and was
invoked only when a compression was set. That's wrong. It all worked
only because default values were the same as expected.

Also no need to await for a compressed payload---doctype may be set at
once.
Go: Do not re-build a test corpus if a requested compression didn't change

It fixes an oversight I made in bc6eb1e to avoid redundant corpus
generaton in spirit of 698bf3e.
Go: Decouple document decoder and body decompressor

In the spirit of ce45bf30795 abstract away from a body compressor. This
change simplifies introduction of zlib support.
Go: Add support of zlib document compression

Sereal protocol version 3 introduced the new document type 3, the zlib
compression. This commit implements zlib support for both encoder and
decoder via the ZlibCompressor type.

Compat tests pass:

    (1) mvuets@ilosonaloje:~/proj/sereal/Go/sereal$ make test_all CORPUS_PROTO_VER=3 CORPUS_COMPRESS=SRL_ZLIB
    rm -f test_dir/VERSION_*
    rm -f test_dir/COMPRESS_*
    perl -Mblib=../../Perl/Decoder/blib/ -Mblib=../../Perl/Encoder/blib -I../../Perl/shared/t/lib/ -MSereal::TestSet -MSereal::Encoder -e '$Sereal::TestSet::PROTO_VERSION=3; $Sereal::TestSet::COMPRESS=Sereal::Encoder::SRL_ZLIB; Sereal::TestSet::write_test_files("test_dir")'
    touch "test_dir/VERSION_3"
    touch "test_dir/COMPRESS_SRL_ZLIB"
    go test
    PASS
    ok      github.com/Sereal/Sereal/Go/sereal      0.051s
    rm -f test_dir/test_data_*-go.out
    go test -test.run=TestCorpus
    PASS
    ok      github.com/Sereal/Sereal/Go/sereal      0.038s
    prove ./test-compat.pl
    ./test-compat.pl .. ok
    All tests successful.
    Files=1, Tests=714,  0 wallclock secs ( 0.08 usr  0.00 sys +  0.16 cusr  0.02 csys =  0.26 CPU)
    Result: PASS
Go: Refine README.md
Go: Document exported Snappy and Zlib compressors
Go: Add support for obsolete document type 1 (non-incr Snappy)

Document type 1 (non-incremental Snappy) has been obsoleted since Sereal
protocol version 2. But the package allows to create documents of
version 1, hence it should be possible to use document type 1 as well.

The compat test suite isn't able to generate a corpus of version 1 and
document type 1. The following little patch may be applied in order to
generate such a corpus:

    diff --git a/Perl/shared/t/lib/Sereal/TestSet.pm b/Perl/shared/t/lib/Sereal/TestSet.pm
    index 2608baf..687a23f 100644
    --- a/Perl/shared/t/lib/Sereal/TestSet.pm
    +++ b/Perl/shared/t/lib/Sereal/TestSet.pm
    @@ -882,8 +882,8 @@ sub write_test_files {
         }

         my $encoder = Sereal::Encoder->new({
    -        protocol_version => $PROTO_VERSION,
    -        compress => $COMPRESS || Sereal::Encoder::SRL_UNCOMPRESSED(),
    +        protocol_version => 1,
    +        snappy => 1,
         });
         foreach my $i (0..$#RoundtripTests) {
             my $testno = @BasicTests + $i + 1;

And tests pass:

    (1) mvuets@ilosonaloje:~/proj/sereal/Go/sereal$ rm -rf test_dir
    (1) mvuets@ilosonaloje:~/proj/sereal/Go/sereal$ make test_all
    rm -f test_dir/VERSION_*
    rm -f test_dir/COMPRESS_*
    perl -Mblib=../../Perl/Decoder/blib/ -Mblib=../../Perl/Encoder/blib -I../../Perl/shared/t/lib/ -MSereal::TestSet -MSereal::Encoder -e '$Sereal::TestSet::PROTO_VERSION=3; $Sereal::TestSet::COMPRESS=Sereal::Encoder::SRL_UNCOMPRESSED; Sereal::TestSet::write_test_files("test_dir")'
    touch "test_dir/VERSION_3"
    touch "test_dir/COMPRESS_SRL_UNCOMPRESSED"
    go test
    PASS
    ok      github.com/Sereal/Sereal/Go/sereal      0.070s
    rm -f test_dir/test_data_*-go.out
    go test -test.run=TestCorpus
    PASS
    ok      github.com/Sereal/Sereal/Go/sereal      0.072s
    prove ./test-compat.pl
    ./test-compat.pl .. ok
Go: Copy "compress/zlib" compression level constants

Copy "compress/zlib" compression level constants here, so that a
user of the "github.com/Sereal/Sereal/Go/sereal" package doesn't have to
also import "compress/zlib".
Go: Add Zlib-compressed encoding benchmark

Benchmark encoding a complex nested data structure with a user header
into a Zlib-compressed Sereal document.