Implement hashcode() and equals() for Braids