Fix bug in avro serialization for empty collections.
Add additional test for avro.