MAINT: refactor packbits/unpackbits

Pushes the GIL release one loop outward.
If `in_N` is zero, this doesn't work. Might want to note that in the comment, or just return.