Add sort.grad support for vector and matrix when axis is None.
clean up tests.
Better error message
Merge pull request #1923 from nouiz/sort_grad

Add sort.grad support for vector and matrix when axis is None.