Modified TypeUnion format for bot Json and Xml serialization

Fixed Json and Xml serialization to support complex types (TypeUnion, TypeUnion of complex types, etc.)
Refactored Readers and Writers into separated files