Fix incorrect rendering of sharp angles with thick polylines.

Previously, this resulted in very long spikes which looked disturbing. The fix
removes the spikes, and looks good with non-translucent lines. It does not look
as good with translucency though (although, it is still an improvement over the
spike output). In a few cases the new code produces overlap where there was
none before, e.g. when you have a very short segment at a right angle with a
very long segment. I have tried detecting that case, but it wasn't very
robust... something to address in the future.

Also adjust one of the test cases (it was testing for the presense of the
spike!)