Kruskal's alg implementation for 2013-03-04 class

http://xkcd.com/1179/

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>