pyloxi: create inheritance hierarchy

Virtual classes are generated but currently only serve as superclasses.

Somehow this works without topologically sorting the classes.
diff --git a/py_gen/tests/of12.py b/py_gen/tests/of12.py
index 98d999b..fcdb0cf 100644
--- a/py_gen/tests/of12.py
+++ b/py_gen/tests/of12.py
@@ -29,6 +29,7 @@
 from testutil import add_datafiles_tests
 
 try:
+    import loxi
     import loxi.of12 as ofp
 except ImportError:
     exit("loxi package not found. Try setting PYTHONPATH.")
@@ -74,7 +75,9 @@
         mods = [ofp.action,ofp.message,ofp.common,ofp.oxm]
         self.klasses = [klass for mod in mods
                               for klass in mod.__dict__.values()
-                              if hasattr(klass, 'show')]
+                              if isinstance(klass, type) and
+                                 issubclass(klass, loxi.OFObject) and
+                                 hasattr(klass, 'pack')]
         self.klasses.sort(key=lambda x: str(x))
 
     def test_serialization(self):
@@ -96,7 +99,7 @@
     def test_parse_message(self):
         expected_failures = []
         for klass in self.klasses:
-            if not issubclass(klass, ofp.message.Message):
+            if not issubclass(klass, ofp.message.message):
                 continue
             def fn():
                 obj = klass(xid=42)