Reworked TS alignment to use the same TSAlignIterator for aligning into
different media: matrix and TSMap.