fix sparse getindex regression.
also replaced binarysearch with methods from sort.jl
ref #7131, #7047
Merge pull request #7162 from tanmaykm/tanmaykm

fix sparse getindex regression