[DNM] - 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.
- [ ] No power load. Briefly works after breaker/power channel toggling before going to 0. No clue as to why, functions in /tg/'s code base.
- [ ] Current cell load/recharge is rather silly.
- [ ] Restore per APC power excess info?

**Testing**
- [x] Check if Z-level support remains as functional as before.
- [ ] Conduct further local testing.
This section has been updated to disable channels when the current charge goes below 15 and 30% max charge of a standard cell.
This allows larger cells to keep channels online for longer but may cause some initial confusion when someone notices that channels don't turn off at the previously expected limits.

atlantiscze <notifications@github.com> wrote:

>In code/modules/power/apc.dm:
>
>> -			if(autoflag != 3) > -				equipment = autoset(equipment, 1) > -				lighting = autoset(lighting, 1) > -				environ = autoset(environ, 1) > -				autoflag = 3 > +		if(cell.charge <= 0)					// zero charge, turn all off > +			equipment = autoset(equipment, 0) > +			lighting = autoset(lighting, 0) > +			environ = autoset(environ, 0) > +			area.poweralert(0, src) > +		else if(cell.percent() < 15 && longtermpower < 0)	// <15%, turn off lighting & equipment > +			equipment = autoset(equipment, 2) > +			lighting = autoset(lighting, 2) > +			environ = autoset(environ, 1) > +			area.poweralert(0, src) > +		else if(cell.percent() < 30 && longtermpower < 0)			// <30%, turn off equipment 
>
>Since newatmos, even vents use quite a bit of energy. If APC shuts down lights and equipment at ~2% of cell charge, remaining power is gone within few minutes at most, resulting in completely unpowered area. Personally i think percentage based levels are much better, as higher capacity cells are usually placed in areas with higher loads. And ENVIRON channel is usually the most demanding ones (along with EQUIP with freezers) in these areas (Atmospherics for example). Giving the APC more time before environment fails is good idea. Original value was simply too low.
>
>—
>Reply to this email directly or view it on GitHub.￼
>
>{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Pull Request on GitHub","action":{"@type":"ViewAction","url":"https://github.com/Baystation12/Baystation12/pull/6651/files#r18890533","name":"View Pull Request"}}