Fix artifacts in outlines of small selections
I had to rewrite the outline generation algorithm to fix three issues:
- The start point should not be duplicated
- End point should be the same as the start point
- There should be no artifacts on "internal selection holes"
BUG:407868