Draw rounded border segments

This breaks outlines and collapsed borders
Fix outlines and collapsed borders in tables
Fix overlapping curves
Fix a couple of little things
Fix a couple of things again
Remove duplicate code
Fix min and max calls
Handle inset and outset border styles
Handle ridge and groove