Changed internal notification of completion in DijkstraAlgorithm.

Greg reconsidered use of Thread.yield() after Elijah did profiling on
object and found that yield() consumed most of the CPU time.