Improved the re-usability of LinePath

LinePath now takes an `Array<T>` instead of T[], which should improve the possibilities to avoid GC.

I also made the `createPath` method public so one can re-create the path based on new waypoints without having to create a whole new `LinePath`.
Yeah good move :)
BTW, I'm going to close this because I've already merged it manually with my local changes. Will commit soon.