Fraig almost done

1. Make sure merged gate always has bigger dfsOrder, thus be the parent
2. Clean fecGroups after fraig
3. Fix a bug about inv bit in simulation
Fraig: fix some bugs
Fraig: done

1. Delete damn error detection codes from HW6
2. Clean some redundant codes