Fix shortestPathTo issue after seeing visited node

When I was working on shortestPathTo before, it looks like I introduced an error while copying my changes onto a branch: https://github.com/scala-graph/scala-graph/issues/12

This pull request includes a fix, and a scalacheck test for pathTo.isDefined === shortestPathTo.isDefined.