BUG: core: don't ignore raised exceptions in __numpy_ufunc__ handler

The current __numpy_ufunc__ handled ignores exceptions raised inside the __numpy_ufunc__ function. This PR fixes the issue.

I also refactor the control flow and refcount management in PyUFunc_CheckOverride to be a bit simpler.