Bring general sketch commits upstream

Move the general parts of PR #1178 upstream decrease the maintenance work.
How about a wrapper method to allow ranges as parameters?

```C++
DouglasPeucker::Run(std::vector<SegmentInformation> &input_geometry, const unsigned zoom_level)
{
  Run(std::begin(input_geometry), std::end(input_geometry), zoom_level);
}
```

This introduces less changes in the existing code.