Use collections.OrderedDict

This pull requests changes instances of plain old dictionaries to `collections.OrderedDict` in the `Builder` class. From a human perspective, its nice to have a predictable order of keys in the JSON output.