rewrite the argsort routine.

sort.argsort takes a new argmerge that behave differently
from the old merge