Rank should prefer the shortest possible edges

The previous implementation of feasibleTree would continue to scan for
nodes to add to the tree after it had exhausted a successful search.
This opened up the possibility for constructing a forest when a
non-tight edge was encountered from the tree. Consequently it was
possible that some nodes were not connected to the tree by tight edges.

This change adds a new smoke test to ensure that we prefer the shortest
possible edges, where possible. The idea is this: for each component in
the graph remove all non-tight edges; if this leaves the compoonent
unconnected then we know that there was at least one edge that should
have been made tight but was not.

This change also fixes the underlying issue. As soon as we finish DFS
from a tree node we stop scanning other potential nodes and instead
create new tight edges (if necessary) and rescan.

Fixes #105