Dataset dimensions always appear in sorted order

Prior to this patch, dimensions appeared in the order in which they were added.
This was generally fine, but it means that some output which depends on dimension
order (e.g., dataframe output) does not always appear the same, depending on
the order in which dataset variables were added. This patch now stores
dimensions internally in an unordered dict, but sorts the dimensions into
alphabetical order every time they are accessed.