Add missing imports needed for format predicates (Mantis bug 371).

compiler/module_imports.m:
    Don't just scan a few kinds of items, scan all items that contain
    goals and/or terms. This includes the instance items that caused
    mantis bug 371, as well as some others (promises, mutables, and
    type definitions).

compiler/prog_data.m:
    Delete an out-of-date comment.

tests/valid/string_format_in_instance.m:
    Add the Mantis test case under a meaningful name.

tests/valid/Mmakefile:
    Enable the new test case.
Update the style of module_qual.m.

compiler/module_qual.m:
    Change predicates that do case analysis on an input argument
    from having one clause per function symbol to an explicit disjunction.
    (We don't have to worry about indexing in NU-Prolog anymore.)
    This sometimes allows factoring out repeated code.

    Separate the task of module qualifying one thing and the task of
    module qualifying a list of those things.

    Add a distinguishing prefix to the fields of mq_info.
Use sets in module_qual.m where appropriate.