Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.
RetainCountChecker: Replace some loops with std:: algorithms.