Converts streamlines (a list of point sequences) into the pair of
point matrices that describes the line segments between their consecutive
points, which is the representation used by fs.coloredpaths.
This is vectorized: the segments of all streamlines are computed in one go,
no matter how many there are.
streamlines.to.segments(tracts)named list with entries from (matrix of segment start points),
to (matrix of segment end points) and lengths (integer vector,
the number of segments of each streamline).
an fs.tracts instance (as returned in the tracks
entry of freesurferformats::read.dti.trk and
freesurferformats::read.dti.tck), an (n, 3) matrix of points (a
single streamline), or a list of (n, 3) matrices (one per streamline).