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.
They array being `Py_DECREF`'ed in 271 only exists in the `if (monotonic == -1)` scope, hence the specific call to `Py_DECREF` right there. You think it should be declared at the beginning of the function so that it can be `Py_XDECREF`'ed with the others?

Just to be clear, the error this fixes was being triggered when going to fail from lines 228 or 235