Made UnionRectangles use Nullable Rectangles.

Also modified the code in LineCurveTool to use it properly.