PROTON-698: return false if given object class differs, and shortcut equality of the object with itself