BUG: fix handling of negative strides in npy_memchr

the new code did not account for them at all, add the old loops back but
keep the stride 1 optimization for sparse masks.