Generate a specific warning for X = f(X).

This warning is for when X is ground. When X is free (or otherwise nonground),
such unifications have always gotten an error.

compiler/mode_errors.m:
    Add a warning type for occur check violations with ground vars.

    Fix the grammar in the other two warnings generated by mode analysis.

compiler/modecheck_unify.m:
    Generate the new warning when appropriate.

    To make this possible, rewrite a previously 280-line predicate
    that was hard to understand because of its structure as well as its
    length into a smaller, better structured predicate less than half the size
    (a) by moving coherent pieces of it out into other predicates,
    some of which are now called more than once, thus reducing code
    duplication, and (b) by avoiding redundant work, to wit, optimizing
    the form of a unification when we have already decided that it has
    a mode error, and thus cannot be scheduled now.

compiler/prog_mode.m:
    Add a det version of an existing predicate.

compiler/inst_util.m:
    Remove a comment on a predicate implementation that duplicates the
    comment on the predicate's declaration.

compiler/modecheck_util.m:
    Minor fixes of comments.

compiler/superhomogeneous.m:
    Fix some bit rot: update the name of a predicate to match
    the name of the data it works on, which was changed a few
    years ago.

tests/invalid/occurs.err_exp:
tests/invalid/qualified_cons_id2.err_exp:
tests/warning/simple_code.exp:
tests/warning/unify_f_g.exp:
    Conform to the error message format we generate after the change
    to mode_errors.m.

tests/warning/unify_x_f_x.{m,exp}:
    A new test case to test the new functionality.

tests/warning/Mmakefile:
    Enable the new test case.