ReferenceValueHolder::isEqualTo now compares docs

ReferenceValueHolder::isEqualTo now compares documents instead of merely the document identifiers.
This required for the index_field option of the ReferenceField to be consistently updated on succeeding toArray invocations.