Finally got to bottom of dynamic maxDirectionChanges bug

The code is now working but is a bit scruffy. I plan to clean it up. I
also stopped using TPL to help troubleshoot the problem. I will put this
back in.
The bug was that Paths.AddPath was de-dup'ing abandoned paths which
meant that some abandoned paths were being lost. We now only de-dup
completed paths.