ENH: implement `digitize` with `PyArray_SearchSorted`

Closes #2656 and replaces #4184.
This doesn't look like the right place. Hmm, I'll make a comment up above.