making the equals method work when the obj graph has circular references.  This uses WeakMap.