Fix XML reference handling

The  existing code put XML (0x0B) types into the string reference table, however the docs (and reality) indicate that they should be stored in the object reference table instead. This caused issues where objects contained XML and objects or strings were stored by reference, resulting in incorrect deserialized strings or invalid casts.