This commit ensures that dashed segments always start and end with half a dash.

We should probably do better, and apply the condition in the TODO comment. But
this matches existing rendering engines much closer than we do right now.

We also ensure to always draw something in a dashed border corner.