Gil release for nonzero

release gil for nonzero and add an internal NPY_BEGIN_THREAD_NDITER to simplify gil release of nditer loops.
also remove some unnecessary needs_api checks, the thread variable is initialized to NULL and checked by the end macro so it is redundant.