use addElementArray for arrays
move generation of the serialization method for a type info the type (not just the name), so that in the future we can pass additional params in some cases.
move serializerMethod generation to ComplexTypeProperty,
use ComplexTypeProperty instead of OperationParameter.
when writing serializer, use nillable/optional where appropriate.
improve formatted of generated serialization code.