BUG: digitize segfaults on TypeError

The new searchsorted-based digitize introduced in #5101 segfaults
when it should raise a TypeError.

Should be backported to 1.9.x.
If leaving this, could remove `Py_DECREF` at 271, or alternatively, do the `Py_DECREF`s before 280 and return `NULL`.  instead of jumping to fail. The first seems a bit cleaner, although `fail` isn't quite right then, but nothing else seems quite right either. The refs can also be unrolled with a sequence of labels, fail1, fail2, fail3, etc. I don't think we have any sort of policy for these things. Hmmm..., just doing the first is probably best.