internal: introduced new structures and types as well as some tweaks

Unfortunately we need to store the id of a node in the structure itself,
because Prim's algorithm indexes the adjacency list by node id and
searches a particular node by its id in the priority queue which in case
of our former Fibonacci node definition would not be possible to do