Change is_within() logic to apply to actual data

Instead of just removing lines from our visualization, but keeping
them in the actual data, we should remove lines from the actual data
when we find that they go outside the polygon.

Problem is, at the moment the way the sortedpoints function is written,
we have the following:

Points [a, b, c, d, e, f]
-> vectors [(a,b), (b,c), (c,d), (d,e), (e,f)]
Then back to polyline [a, b, c, d, e, f] for drawing and output

If the vector (c,d) is outside the polygon and is rejected, we get:
Points [a, b, c, d, e, f]
-> vectors [(a,b), (b,c), (c,d), (d,e), (e,f)]
Reject (c,d)
-> vectors [(a,b), (b,c), (d,e), (e,f)]
Then back to polyline [a, b, d, e, f] for drawing and output

But since (b,d) is also outside the polygon, our list is wrong. We
should instead subdivide into two lists... but the way we've written
closesort(), that's tricky. Instead, we'll apply the "identify endpoints
and start at endpoints" approach that we discussed yesterday.