Replace hsArrays in SortVisibleSpans() with STL vectors
This seems to fix occasional crashes encountered on TOC.
Merge pull request #455 from Mystler/vectorize

Vectorization of crashy code