Factor out serialization functions into their own file.

Create a brotli_bit_stream library that is responsible for writing
various structures (headers, Huffman codes, etc.) directly into the
bit-stream.
Fix TODO markups.
Merge pull request #3 from szabadka/encoder

Factor out serialization functions into their own file.