MAINT: refactor packbits/unpackbits

Pushes the GIL release one loop outward.
Makes me wonder what happens to the extra bits that may be present in the packed version.