util.py defines global helper functions connect_nodes and disconnect_nodes; however, these functions are confusing because they take a node and an index (instead of two indexes).
The TestFramework object has enough context to convert from i to self.nodes[i], so we can replace all instances of connect_nodes(self.nodes[a], b) with self.connect_nodes(a, b). Similarly, we can replace instances of disconnect_nodes.
The approach taken in this PR builds on #19945 but uses a scripted-diff for the majority of the changes.
Fixes: #19821