MAINT: refactor packbits/unpackbits

Pushes the GIL release one loop outward.
I'd probably run through all integer types and booleans, but this probably suffices. An easy way to get them is
```
In [3]: np.typecodes
Out[3]: 
{'All': '?bhilqpBHILQPefdgFDGSUVOMm',
 'AllFloat': 'efdgFDG',
 'AllInteger': 'bBhHiIlLqQpP',
 'Character': 'c',
 'Complex': 'FDG',
 'Datetime': 'Mm',
 'Float': 'efdg',
 'Integer': 'bhilqp',
 'UnsignedInteger': 'BHILQP'}
```