TreeEntry: add rich comparison function

Allow direct comparisons between TreeEntry objects, which also allows us
to use assertEqual in the sanity check test.

This fixes #305.
Merge remote-tracking branch 'carlos/commit-attr-id'
Merge remote-tracking branch 'carlos/config-iterator'
Merge remote-tracking branch 'carlos/treeentry-cmp'
Refspec: create the type to wrap refspecs
Refspec: implement transform functions
Refspec: add documentation