Add object comparison methods

Note that properties had to be rearranged to support proper ordering
comparison.