Improvments to connectivity algorithms and testing suite
The check for connectivity was very slow, which was in turn slowing
down the unit tests considerably, and rendering our ability to test
dijkstra''s algorithm on very large graphs to be non-existent. This
came from an error in the copy constructor, where we were deleting
all of our vertices by un-tangeling the web of edges in the graph,
one-by-one. This is unnecessary, since we were just clobbering the
current graph, so I added a destroyGraph() function, which just
goes through and deletes/frees up all vertices and edges in the
graph.
I also simplified the dijkstra testing suite by making the various
union-build-graph techniques into one function that can be called
with various parameters, like number of vertices, number of
subgraphs, and number of random edges to tack on. This function
can now be called when-ever which makes it easier to test large
graphs in the suite.