std.bitmanip BitArray refactor and various fixes
Merge pull request #2249 from Safety0ff/bitarrayrefact

std.bitmanip BitArray refactor