Fix DouglasPuecker and add UnitTest

This has the added benefit that the testing infrastructure from the ```route-sketch``` branch is moved upstream.