Fix some more sharp-angle polyline drawing bugs.

This one involves cases when the miter distance is very negative. Additionally,
sometimes the middle vector is set to 0... I fix it just in case as well.Also,
I figure setting miter distance to a valid value isn't too problematic either
(it is returned sometimes, so it could affect things.
Add a collinear polyline test