(Partial) fix for https://github.com/aodn/aodn-portal/issues/580 and htt...

...ps://github.com/aodn/spatial-search/issues/9

Either a point or linestring is now being created for each trajectories segment (rather than always linestrings, which were invalid where the start and end points are the same).