SANDBOX-349: Verify Prim's and Kruskal's algorithms correctness - applying Rogério Theodoro de Brito's first three patches

git-svn-id: http://svn.apache.org/repos/asf/commons/sandbox/graph/trunk@1559792 13f79535-47bb-0310-9956-ffa450edef68