make ordered type cache more robust
Allow multiple entries that are equal according to the ordered comparison
predicate typekey_compare, but not equal according to jl_types_equal.
This is mostly needed for types in replaced modules, which can be
distinguished by pointer comparison but cannot be reliably ordered (since
they differ only in memory address).