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

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