Powernets machines connection polishing

* Makes machines connecting to powernets correctly call the _connect_to_network_ and _disconnect_from_network_ procs instead of directly adding the machines to the powernets.
* Removed a now unused variable

__Must be merged alongside #placeholder_for_incoming_solar_control_refactoring (because the variable removed is also in solar panels and tracker)__