realization of algorithm http://en.wikipedia.org/wiki/External_sorting. multithread,cross-platform