Geolib rework Polyline

- Added some tests for class Polyline.
- Corrected class Polyline according to test results.