migen/fhdl/tools: speed up group_by_targets (halves the mixxeo runtime)