Fix bug in UDTAnalyzer

Iterator of analysed list types was not correctly generated when arrays
are used.
Fix bug in Scala serialization code generation
Merge pull request #161 from aljoscha/serializer-fixes

Serializer fixes