Some memory optimizations for reading channel logs

Generate less garbage by skipping over unwanted entries in the binary-
encoded form without allocating structs for them.
Also made the readString call more memory-efficient.
Use json.Encoder to marshal directly to output stream when possible

This generates less garbage than using json.Marshal to create a []byte
and writing that to the output.