BUG: fix wrong error checks of PyBytes_AsStringAndSize

The check in ufunc_type_resolution.c is broken due to a spurious not and
a few cases of TypeError being overwritten without clearing.
Also change all of these error checks to a negative check for
consistency.
BUG: np.unique with chararray + inverse_index

The call to `empty_like` was trying to use the `chararray` subclass,
which doesn't support the `np.intp` dtype.