pyloxi: generate virtual class unpack methods

This is done completely from the IR now.
diff --git a/py_gen/util.py b/py_gen/util.py
index b405441..2a0dc54 100644
--- a/py_gen/util.py
+++ b/py_gen/util.py
@@ -49,3 +49,10 @@
         if value == value2:
             return "const." + name
     return repr(value)
+
+def ancestors(ofclass):
+    r = []
+    while ofclass:
+        r.append(ofclass)
+        ofclass = ofclass.superclass
+    return r