Standardising API to match xml definition.
JsonSerializer failed to deserialize messages with SkipArrayWrappingForSingleMessages

MessageTypesInitializer was throwing null reference exception when not using the XmlSerializer.
Ensuring proper disposal of MemoryStreams