Fixing improper handling of degenerate quadratic/cubic segments.

The simplification of segments caused the smooth* quadratic/cubic functions to malfunction. Fixes #38