tweak DomainObject comparisons

Martin Reinecke requested to merge comparisons into nightly

This change should make comparisons between DomainObjects (which happen quite often) much faster.

Merge request reports