Fixed NodeTypeDefinition::fromXml + added a test for it

Creating a NodeTypeDefinition from XML didn't work because it wasn't converted to an array before passing it to the ItemDefinition constructor.