fix marker line placement on "squiggly" lines

This is attempt to fix https://github.com/mapnik/mapnik/issues/1486. It should also improve code sharing and readability of line placement code. I was doing some preliminary benchmarking and don't see performance regressions so far. I noticed improved perfomance for rendering with many collisions which is due to `tolerance_iterator`.

Thank you for any feedback.