Makes the curve boundary own the curve data and returns a reference to the boundary.
If the external boundary owns the data, it will be destroyed when the boundary is destroyed.