REF: core: clean up PyUFunc_CheckOverride

Move argument normalization out from the inner loop, reduce complexity.
Add error checks.