Add equals() and hashCode() to some domain classes

This is just to suppress the error on startup. We don't actually need
those methods because we don't put those domain objects in sets.