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.
We can ignore them as they'll get set to zero if ```result.length``` is increased. (Once the issue I just remarked in ```length``` is fixed.)