Minor cleanups before work on bug 311.

compiler/delay_partial_inst.m:
    Avoid unnecessarily splitting a predicate in two.

    Eliminate a number of unnecessary accesses and updates to the module
    info.

    Return the list of changed pred ids in order.

    Add conditional trace goals to write out procedure bodies
    if this pass changes them.