add Revision.equals()

Branches list should be moved outside Revision IMO.
@wannessels is right that commits are branch-independent, but the current implementation may easily lead to collisions (e.g. if a commit appears in another branch due to the external operation)