interior/exterior/perimeter refactor, a few line methods

Add methods:
- DoubleRay.toLineSegment(length)
- LineSegment.toDoubleRay
- LineSegment.withLength(newLength)
- RaySegment.toTuple
- Rectangle.pad(padding)
- Rectangle.Interior.{area,+,-,*,/}

Replace .squareRoot implicit with math.sqrt

Use classes rather than objects for {Triangle, Rectangle} . {Interior,
Exterior, Perimeter}. With the objects, I couldn't figure out a good way to
return appropriate types (for example,
OrthogonalRectangle.Interior.area(newArea) should return
OrthogonalRectangle.Interior).