ENGINE-712: equals() and hashCode() should only use id property

Please review
Javadoc to explain how equality test is performed.