Serial code for rank sort.
Merge branch 'ranksort' of https://github.com/isutanto/Parallel