Rename agencyId to tripId (it is really a trip ID).
Trip selection web-service: initial implementation.
Correctly compute polyline geographical length.
On-board depart: use correct distance computation.

Fraction covered computation was slightly invalid for L shaped segments.
Invert the fraction computation as it was wrong in the first place.
Trip web-service: use a simpler matching factor.

Also isolate trip matching factor computation in a specific method to ease customization.
Trip web-service: use the extended parameter.
Merge pull request #1179 from laurentg/trip-web-service

Trip selection web-service for on-board depart.