Plot the last pixel with Bresenham

This is not important and may be reverted in the future. This patch is
only here for completeness and correctness.

Signed-off-by: Celelibi <celelibi@gmail.com>
Corrected some border errors when filling

The filling is still not always exact when the polygon is
self-intersecting, but it should be ok when it is simple enough.

Signed-off-by: Celelibi <celelibi@gmail.com>
Merge remote-tracking branch 'snqke-gh/master'
Indentation fixing

Bad whitespaces and bad indentation.

Signed-off-by: Celelibi <celelibi@gmail.com>
Sort lists of size 0

It's not an error to try to sort a list of active_edge with no element
at all.

Signed-off-by: Celelibi <celelibi@gmail.com>
Debugging horizontal edges

Horizontal edges were not handled properly because of some optimizations
that assumed they weren't. Now the removal and addition of an edge
adjacent to an horizontal edge is handled.

Still remain some bugs with very complex polygons.

Signed-off-by: Celelibi <celelibi@gmail.com>
New function polygon_insert_vertex_after

This function insert a vertex inside the double linked list and keep the
whole data structure of the polygon consistent. This function assume the
given vertex is part of the polygon.

Signed-off-by: Celelibi <celelibi@gmail.com>
Use the function polygon_insert_vertex_after

This function keep the whole data structure consistent and should be
used instead of playing around with the linked list of vertices. This
resolves the bug of filling a polygon after cutting an edge.

Signed-off-by: Celelibi <celelibi@gmail.com>