Include Vndk version to compatibility matrix XML.

Serialization code is missing before. Also added tests
for converting device compatibility matrices.

Test: libvintf_test
Bug: 36400653
Change-Id: I57aabafdf71f7e9ce05f30e0b14c3d83dc1c183f
diff --git a/parse_xml.cpp b/parse_xml.cpp
index 1435c4e..19ef771 100644
--- a/parse_xml.cpp
+++ b/parse_xml.cpp
@@ -656,6 +656,8 @@
         if (m.mType == SchemaType::FRAMEWORK) {
             appendChildren(root, matrixKernelConverter, m.framework.mKernels, d);
             appendChild(root, sepolicyConverter(m.framework.mSepolicy, d));
+        } else if (m.mType == SchemaType::DEVICE) {
+            appendChild(root, vndkConverter(m.device.mVndk, d));
         }
     }
     bool buildObject(CompatibilityMatrix *object, NodeType *root) const override {