speed up sortperm. ref #6112

on my system, now even faster than before
Merge branch 'master' of github.com:JuliaLang/julia