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=3568
- https://issues.dlang.org/show_bug.cgi?id=11015
The import of typtuple should remain in the unittest block and be added as a local import here, to avoid it being imported on x64. Less dependencies means a faster compile.