Fix detect struct array, add options for encoding, etc into serializers. add wrapper for handle CData in XmlWriter

Instead of changing the `SerializerInterface`, what about passing the options to the constructor of the concrete `Serializer`?