[vector-api] Add ol.format.Polyline

This PR ports @Turbo87's excellent work in #337 to the `vector-api` branch.