MAINT: refactor packbits/unpackbits

Pushes the GIL release one loop outward.
Be nice to check for something other than `1`, but that gets complicated when checking all the types. Hmm, could generate a string of random (nonzero) bytes and view them as the different types in order to have them of the right precision. Conversion of integer types to boolean would provide the boolean equivalent (0 or 1).