loci: fix bug in new wire type parsers

Using the unified class's discriminator was incorrect because the discriminator
can change offset and length between OpenFlow versions.

Also added tests that would have caught this bug.
diff --git a/c_gen/codegen.py b/c_gen/codegen.py
index 6f0f6e9..af4dfa4 100644
--- a/c_gen/codegen.py
+++ b/c_gen/codegen.py
@@ -89,11 +89,10 @@
     if not uclass.virtual:
         return None
 
-    discriminator = uclass.discriminator
-
     # Generate a dict of version -> ParseWireTypesVersion
     versioned = {}
     for version, ofclass in sorted(uclass.version_classes.items()):
+        discriminator = ofclass.discriminator
         subclasses = [ParseWireTypesSubclass(class_name=subclass.name,
                                              value=subclass.member_by_name(discriminator.name).value,
                                              virtual=subclass.virtual)