Hasher used to determine if two diagnostics are the same and should be deduplicated. Used by
DiagCtxtInner::emitted_diagnostics. Itβs a stable hash with one special behaviour: parents of
spans within the diagnostics are ignored so that incremental and non-incremental compilation
get the same behaviour.