Splines 2

These are changes from #1285 that have already been tested, reviewed, and are ready for master. The other splines pull request will just contain Bezier and B-splines and can be merged when we need them.