Support Writing Anonymous Types

In cases where the only desire is to write records to a file, it is
useful to define the collection being written up-front. This provides
type information earlier, which makes it possible to map anonymous
types.