loci: generate match tables from the IR

This removes most of the manual work from adding a new OXM. As a side effect,
it fixes locitest so it doesn't try to test OpenFlow 1.3 OXMs with an OF 1.2
message.
diff --git a/c_gen/c_test_gen.py b/c_gen/c_test_gen.py
index 5501ed3..aff1ca6 100644
--- a/c_gen/c_test_gen.py
+++ b/c_gen/c_test_gen.py
@@ -271,10 +271,8 @@
 
 """)
 
-    populate_match_version(1, match.of_v1_keys)
-    populate_match_version(2, match.of_v2_keys)
-    populate_match_version(3, match.match_keys_sorted)
-    populate_match_version(4, match.match_keys_sorted)
+    for wire_version, match_keys in match.match_keys.items():
+        populate_match_version(wire_version, match_keys)
 
     out.write("""
     if (value % 2) {