Added a sort_stops opt to get_gtfs_stop_id_pair_of_segment() func.

(Added since realised sometimes order of these stop IDs is important).
Added get_stop_ids_in_travel_dir() func

A utility func that is useful if getting stop order in a segment, along
current dir of travel, is important.
Updated assign speeds to ext script to deal with stop order issue

Had a problem whereby the order of stop IDs in speed files is important,
but it wasn't being considered when looking these up propoerly in
assign_speeds_to_new_routes_extensions.py . With help of new utility
funcs added in recent commits, is now fixed.