bugfix in fill_polygon

When marking triangles in fill_polygon, sometimes two lines may stick
together, and the algorithm will think that they're the same line. In
this case, start and end of the row will collapse, leaving it unfilled.

Solution to this problem is to count only the last pixel of row for
every line. In the previous case, the covered area won't collapse if
only two pixels are counted (instead of two segments).