ENH: implement `digitize` with `PyArray_SearchSorted`

Closes #2656 and replaces #4184.
What happens if it isn't 1-D?