std.bitmanip BitArray refactor

I reviewed BitArray and found a few issues:
- constness
- incorrect treatment of "pad" bits
- many places where size_t should have been used.
Now that you mention it, I didn't consider that if you shrink the size considerably it sometimes frees memory.