Don't emit last segment of a loop if it is linear

See diagrams/diagrams-cairo#38.  This wasn't actually causing any
observable problems in the SVG backend output, but this seems a
better/more robust way to do things in any case.