Fix test for "do branches have different typeclass_infos ...

... for the same constraint?"

This completes the workaround for Mantis bug #585.

compiler/hlds_rtti.m:
    The old test tried to rely on an invariant that the types of
    rtti_varmaps's fields imply, but which the polymorphism pass
    does not actually establish. Specifically, The constraint to
    typeclass_info (tci) var map does NOT contain the same edges
    as the tci_var to constraint map.

    Reimplement *part* of the test here by relying only on the
    tci_var to constraint map.

    Document the absence of the implied invariant, the presence
    of base_typeclass_info vars in maps whose documentation says
    they only contain (non-base) typeclass_info vars, and the
    reasons why we cannot implement the full test here.

compiler/simplify_proc.m:
    Use the new half test, and add code to implement the other half,
    which is direct check for the situation causing Mantis bug #585
    using a goal traversal.

    Now that the test is fixed, keep the diagnostic we generate.

compiler/polymorphism_type_class_info.m:
    Add a comment describing the reason for a design decision
    related to bug #585.

library/one_or_more_map.m:
    Add both pred and func forms of the to_sorted_assoc_list operation.
    (one_or_more_map.m already contains from_sorted_assoc_list,
    and map.m contains to_sorted_assoc_list, so the previous absence
    of to_sorted_assoc_list was surprising.) The new operation
    is now used in hlds_rtti.m.

NEWS.md:
    Document the new operation.

tests/invalid/Mercury.options:
    Specify verbose errors for the tci_liveness_abort test case.

tests/invalid/tci_liveness_abort.err_exp:
    Expect the diagnostics we now generate.
