Apply Kruskal's algorithm (#710)

Apply Kruskal's algorithm (#710)

Find minimum spanning tree by adding edges in order of increasing weight.