Factor out common code in code generation for switches.

compiler/switch_util.m:
    Move here some code that was common to switch_gen.m and ml_switch_gen.m.

compiler/switch_gen.m:
compiler/ml_switch_gen.m:
    Remove the code moved to switch_util.m.

    In switch_gen.m, remove a long unused predicate.

compiler/code_info.m:
    Simplify the interface of the init predicate for code_infos.

compiler/proc_gen.m:
    Conform to the change in code_info.m.