Make filling in goal ids faster.

compiler/goal_path.m:
    When filling in the goal ids in a procedure body, avoid building 234 trees
    that we have keep modifying. Build a simple list, and convert it to a
    234 tree all at once at the end. Repeated insertions into a 234 tree
    leave several garbage cells behind per insertion (at least one per level of
    the tree), whereas our new method leaves just one pair cell and one cons
    cell per goal id.