Conform to new serializer interface, etc

Misc fixes for new serializer interface (flush instead of close,
write_key_value instead of write_translation), changed hash to map,
array to sequence for consistency with yaml-write-stream.