Merge pull request #7 from alberts/master

ReadFromStream fast path (less allocations) for single segment
Add a simple method for marshaling to json.

This adds a simple json dumper to the generated files.
Add MarshalJSON forwarder
Don't import JSON imports when file has no JSON writing types.
Handle TEXT_DATA and lists.

This changes the codegen so that every field get its own block with a redeclaration. Keeps the code handling names and values separate.
Don't declare encoder if not used.

If the encoder wasn't used in a function, the Go compiler would not compile the file.
Add annotation to add doc comments to structs, fields and enums.
Add error checking on JSON formatting
Add missing error check.
Use json.Marshal instead of encoder

Gets rid of some of the nastier pieces of logic in the compiler and doesn't put a newline on the end of each primitive value.
Merge pull request #8 from DanielMorsing/jsondump

Jsondump
Overhaul packing algorithm

This fixes 2 bugs. One where indexes were mishandled and one where
raw blocks would always be empty.

Also, gofmt
Merge pull request #10 from DanielMorsing/compressorfix

Overhaul packing algorithm
Add documentation about documentation feature.
Merge pull request #13 from DanielMorsing/docannotations

Docannotations
Make go-capnproto 32-bit compatible

math.MaxUint32 is too big for an int context:
"constant 4294967295 overflows int"

With this change the code compiles and runs on 32-bit machines.
Merge pull request #15 from darabos/patch-1

Make go-capnproto 32-bit compatible
Fix Decompressor. Expand test suite.