Ports /tg/'s cable and powernet code

Can now cross cables without transferring power between them, and likely also have two 90-degree/diagonal cables cross the same turf without connecting.
May also resolve issues with powernets not updating correctly, in particular when placing diagonal cables.

**Known points**
- [x] Breaker boxes shall be supported again.
- [x] Port /tg/'s solar code.
- [x] Terminals shall reconnect properly if underlying cable is cut and replaced.
- [x] Optional but much desirable: Complete the port of /tg/'s wire system rather than leave it halfdone.
- [x] No power load. Briefly works after round start/breaker/power channel toggling before going to 0. No clue as to why, functions in /tg/'s code base.
- [x] Power channel toggling on/off good enough.
- [x] Restore per APC power balancing.

**Testing**
- [x] Check if Z-level support remains as functional as before.
- [ ] Conduct further local testing.
Since ```newload``` is no longer a thing, ```last_surplus()``` no longer has any purpose, and any instances where it is used should be looked at very carefully.