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.

Incidental fixes:
- https://issues.dlang.org/show_bug.cgi?id=11015
I think it's probably best to just leave this as it was, so that you don't accidentally introduce a breaking change. That is of course provided this worked correctly to begin with?