ENH: optimize np.where via nditer with external loop

Implementation via PyArray_Choose is very slow, a direct implementation
is 10 times faster.
Optimizing Choose is more complicated due to its higher complexity and
would require specialization for optimal np.where anyway, but it is
something that could be done in future.