Fix #37: Preserve order of attributes on serialization.

This doesn't do anything about the fact that none of our
treebuilders preserve attribute order: it merely avoids the
serializer reordering them from the order it receives them in.

This changes the serializer tests to use an OrderedDict to get
alphabetical order so they continue to meet their expectations.