bitarray: less unpackings, fix return types, more testing

I was hoping to complete this before the 0.1 tag announcement and I'm not sure this qualifies as "critical bug fixes", as the fixes are limited to the return type of some operations. However, besides improving memory consumption and efficiency, tests are also more thorough than before (and this time without `Int64`s hanging around...), so I think it should be safe. Otherwise it can wait until after 0.1.