pyloxi: slightly generalize alignment

The _pack and _unpack templates should not be matching on particular class
names. Move the decision up a few levels to codegen.
diff --git a/py_gen/templates/_pack.py b/py_gen/templates/_pack.py
index 534e930..9956cf6 100644
--- a/py_gen/templates/_pack.py
+++ b/py_gen/templates/_pack.py
@@ -56,12 +56,12 @@
 :: #endfor
 :: if length_member_index != None:
         length = sum([len(x) for x in packed])
-:: if ofclass.name == 'of_action_set_field':
+:: if ofclass.has_internal_alignment:
         packed.append(loxi.generic_util.pad_to(8, length))
         length += len(packed[-1])
 :: #endif
         packed[${length_member_index}] = ${gen_pack_expr(length_member.oftype, 'length')}
 :: #endif
-:: if ofclass.name == 'of_match_v3':
+:: if ofclass.has_external_alignment:
         packed.append(loxi.generic_util.pad_to(8, length))
 :: #endif