Code cleanup and fixes

Cleaned up unnecessary code when finding the initial current_node.
Also, improved it to handle values of infinity correctly (to not add a
predecessor that is infinity away just because there’s nothing else
better). Also, improved handling for when the elements of index_values
are not the output of range(), and encapsulated the example code.
Factored out stuff from distance-vector

Factored out content of distance-vector routing implementation for use
with link-state-routing implementation.
Implemented link-state-routing

Implemented link-state-routing, using some of the code that had been
factored out from distance-vector-routing