Add support for serializing collection types.

Note that the leading two bytes in the serialized collection buffers
express the cardinality as a 16-bit integer.
Recompile with Thrift v0.9.0.